NiFi: "pipeline" or Input/Output ports between PG in different scopes? - input

We have a processor, lets say in "NiFi Flow">>"A">>"B">>"C" and we want to provide its output (lets say using an Output Port) to a (let say using an Input Port) which is in "NiFi Flow">>"1">>"2">>"3".
How can we connect those Input/Output ports on different levels / scopes on the same installation using the GUI?

Related

How do I launch a SmartSim orchestrator without models?

I'm trying to prototype using the SmartRedis Python client to interact with the SmartSim Orchestrator. Is it possible to launch the orchestrator without any other models in the experiment? If so, what would be the best way to do so?
It is entirely possible to do that. A SmartSim Experiment can contain different types of 'entities' including Models, Ensembles (i.e. groups of Models), and Orchestrator (i.e. the Redis-backed database). None of these entities, however, are 'required' to be in the Experiment.
Here's a short script that creates an experiment which includes only a database.
from SmartSim import Experiment
NUM_DB_NODES = 3
exp = Experiment("Database Only")
db = exp.create_database(db_nodes=NUM_DB_NODES)
exp.generate(db)
exp.start(db)
After this, the Orchestrator (with the number of shards specified by NUM_DB_NODES) will have been spunup. You can then connect the Python client using the following line:
client = smartredis.Client(db.get_address()[0],NUM_DB_NODES>1)

Parse a group of cisco switches, compile a list of IPs and interfaces, and then point a netmiko script to that new list. Possible?

I think my choice of words is correct. I want to take a group of switches and compile a list of Ip addresses and specific interfaces to have netmiko push commands to. For instance, scan all cisco switches and put together a list of all interfaces in vlan X and not being used. Can someone point me in the right direction of how to do this?
Sounds like you need to figure out the different steps to work out your solution.
Maybe something this:
Connect to switch
run show commands
config interface to vlan xx
I don't see any code or anything you have attempted so far but here is a simple flow for looping through a list of IP addresses.
#Python 3.7
from netmiko import ConnectionHandler
username = "user"
password = "password"
for ip in IPlist:
# netmiko code profiles;
cisco ={
"host":IP,
"username":username,
"password":password,
"device_type: "cisco_ios"
}
with ConnectHandler(**cisco) as ssh_conn:
print(sshcon.find_prompt())
# do stuff here.

Where to put common variables for groups in Ansible

We have some scripts to help us set up VPCs with up to 6 VMs in AWS. Now I want to log in to each of these machines. For security reasons we can only access one of them via SSH and then tunnel/proxy through that to the other machines. So in our inventory we have the IP address of the SSH host (we call it Redcarpet) and some other hosts like Elasticsearch, Mongodb and Worker:
#inventory/hosts
[redcarpet]
57.44.113.25
[services]
10.0.1.2
[worker]
10.0.5.77
10.0.1.200
[elasticsearch]
10.0.5.30
[mongodb]
10.0.1.5
Now I need to tell each of the groups, EXCEPT redcarpet to use certain SSH settings. If these were applicable to all groups, I would put them in inventory/group_vars/all.yml, but now I will have to put them in:
inventory/group_vars/services.yml
inventory/group_vars/worker.yml
inventory/group_vars/elasticsearch.yml
inventory/group_vars/mongodb.yml
Which leads to duplication. Therefore I would like to use an include or include_vars to include one or two variables from a common file (e.g. inventory/common.yml). However, when I try to do this in any of the group_var files above, it does not pick up the variables. What is the best practice to use with variables that are common to multiple groups?
If you want to go with the group_vars approach, I would suggest you add another group, and add the dependent groups as children to that group.
#inventory/hosts
[redcarpet]
57.44.113.25
[services]
10.0.1.2
[worker]
10.0.5.77
10.0.1.200
[elasticsearch]
10.0.5.30
[mongodb]
10.0.1.5
[redcarpet_deps:children]
mongodb
elasticsearch
worker
services
And now you can have a group_vars file called redcarpet_deps.yml and they should pickup the vars from there.

how to set traffic statistics in mininet?

I want to make testbed for testing the my own algorithm in mininet. I want to setup link data traffic rate, control traffic rate and link processing rate. but i am not able to it. if anyone have idea how to set up all these. please help me.
thanks,
abha
TL;DR Use D-ITG to generate traffic of your choice.
To define a topology in Mininet -
You can use the MininetEdit.py application in mininet/examples/miniedit.py folder. This will create a .py file defining the topology. You could have also written the same code to create the topology, the MininetEdit application is just a GUI to make it easy.
A sample topology definition looks something like this -
(I have created a simple network with 2 hosts h1, h2 connected to a switch s1)
#!/usr/bin/python
from mininet.net import Mininet
... #More import calls
def myNetwork(net):
info( '*** Add switches\n')
s1 = net.addSwitch('s1')
info( '*** Add hosts\n')
h1 = net.addHost('h1',ip='10.0.0.1',defaultRoute=None)
h2 = net.addHost('h2',ip='10.0.0.2',defaultRoute=None)
info( '*** Add links\n')
net.addLink(h1, s1,bw=200,delay='0ms',loss=0,max_queue_size=1000)
net.addLink(h2, s1,bw=200,delay='0ms',loss=0,max_queue_size=1000)
return net
You can set the maximum link rate / bandwitdh in the MininetEdit app, or change the bw parameter in the addLink function in the code file manually.
If you want to generate some real traffic on this mininet topology, use D-ITG. This is a simple tool that will allow you to generate traffic with different distributions, inter-arrival times, packet sizes, etc.,
So if you want to generate constant rate traffic of say rate KB/s from host h1 to h2, you can follow these steps -
Run xterm h1 from mininet instance
Run the following command on the terminal of h1
ITGSend -a <ip_of_h2> -T UDP -C <rate> -c <packet_size>
You can refer the D-ITG manual for more.

Custom External Ports not showing on custom IP Core - Zedboard

I am trying to build a custom IP peripheral (my_perph). I have used the CIP tool to generate the basic perph and now want to add my custom external port (my_port).
Basically I followed this tutorial http://www.programmableplanet.com/author.asp?section_id=2142&doc_id=264841.
I have added the external port definitions to the top source vhdl my_perph.vhdl .
i.e
Port(
---Add user defined ports here----
MY_PORT : out std_logic;
I then added the port to the MPD file with the syntax:
PORT MY_PORT = "", DIR = O, IO_IF = MY_PORT_0, IO_IS = MY_PORT
This didn't work so I tried losing the 0 to match the name of the VHDL declared port so:
PORT MY_PORT = "", DIR = O, IO_IF = MY_PORT, IO_IS = MY_PORT
The issue is that once I have re-scanned the IP library I get the error saying there is
NO IO_INTERFACE MATCHING MY_PORT
It seems that my custom external port MY_PORT is not being recognised in the IP design although it exists in the HDL of the included IP entity.
And even when I go to add the perph I find that this port does not show up in the info. I am totally lost as I have followed all tutorials and tired every possible thing I can think of!
Read the Platform Specification Format guide. You need to understand all of the MPD file, before just copy and pasting lines within it. The line you have needs to have a matching IO_INTERFACE section (as the error message tells you)
If your IO is not part of a "standard" IO port (see the IO_INTERFACE section of the PSF) you should be able to use simply:
PORT MY_PORT = "", DIR = O