Coder Social home page Coder Social logo

move_flow's Introduction

Running the script

usage: python3 main.py

Before running you will need to create a .env file that you'll need to populate with the following:

# clientId under authentication controls on source environment
CLIENT_ID=''
# secret of above
SECRET=''
# clientId under authentication controls on destination environment
DEST_CLIENT_ID=''
# secret of above
DEST_SECRET=''
# source base url endpoint and interpolated url for api calls specifically to get AF config
GET_FLOW_URL=''
# dest base url endpoint and interpolated url for api calls specifically to post AF Config
POST_FLOW_URL=''
# dest environment url to update action flows via api. We use this to update the name
UPDATE_FLOW_URL=''
# source auth url to get token for API source calls
SOURCE_AUTH_URL=''
# dest auth url to get token for API dest calls
DEST_AUTH_URL=''
# source environment id
SOURCE_ENV=''
# dest environment id
DEST_ENV=''

Dependencies

Dependencies are listed in the requirements.txt file. You can install them by running pip install -r requirements.txt

Adding the Action Flows to move

In BackgroundWorker.py in def run there is a list of action flows to move. You can add or remove from this list as needed. The list is just a simple json list of action flow ids from the source, and the name you want saved to the destination.

Format is as follows:

flows = [
    {'id': 'ABC123', 'name': 'The name you want it called in the destination'},
]

How to use the app

To run just hit the Move AFs button and it'll move the AFs automatically. The text box under the button will update with the status of each move.

There isn't a lot of robust error handling, so be aware of that. For a simple script I didn't think it really required it.

move_flow's People

Contributors

jfsugrue avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.