cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
994
Views
0
Helpful
0
Comments
Orf Gelbrich
Cisco Employee
Cisco Employee

 Problem: 

 

User inputs an IP address and the gateway needs to be created from that input. 

In this case a /24 is used and the gateway is at the low end. 

 

Example: 

 

User input is 10.20.30.40 and the output for the gateway should be 10.20.30.1 

 

Here is the workflow: 

 

Using a string split with regex and a set varaiblesUsing a string split with regex and a set varaibles

 

Workflow has 2 variables: 

 

one user input and one global variableone user input and one global variable

 

The split string looks like this: 

 

Screen Shot 2018-11-10 at 7.22.31 AM.png

 

Note the regex( \.\d+$ ) which returns the first 3 octets and end up in the first part of the split return

 

Screen Shot 2018-11-10 at 7.27.22 AM.png

The set variable takes the first part and attaches the .1 

 

The result is this: 

 

Screen Shot 2018-11-10 at 7.27.09 AM.png

 

 

 https://github.com/ogelbric/CCCAOWorkflows/tree/master/definition_workflow_1CmKxQqlRkqtZyC2hJucyRflM4w

 

 

 

 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking for a $25 gift card