Giter Site home page Giter Site logo

fortigate_api's People

Contributors

eoprede avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

fortigate_api's Issues

Issue appending to object groups

hello again,

Still using this and again its ace so thak you , just wondernig if there is an easy way to add to a group.

for example a user group has 2 members, if I set the members attribute on the group to add the additional it replaces the 2 with the 1 so it replaces instead of appends.

Any help on this would be appreicated

E.g. this creates the group with the member

t.print_data (t.create(['cmdb', 'user', 'group'], data={'name':'VLAN-'+(vlan)+'-GRP','group-type':'firewall','member':[{'name':(username)}]}),verbose=True)

Editing it's member attribute to say:

member':[{'name':(username), {'name':("SOMETHING")}]} replaces it with these 2

Bit If I do

ember':[{'name':("SOMETHING")}]}

it replaces all the members with the new one, wonder if there is an append method.

Get this error

File "api_prefix_list_not_working.py", line 111, in
main()
File "api_prefix_list_not_working.py", line 103, in main
t.print_data (t.edit(['cmdb', 'router', 'prefix-list', 'dwre_sf_block6'], data = prefixlists[1]))
File "api_prefix_list_not_working.py", line 63, in edit
response = json.loads(self.put(path, api=api, params=params, data=data).content)
File "/usr/lib/python2.7/json/init.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

I'm working on this, I followed your advices but I get this error can u help me?

Move policy

Hi, loving this first of all,

I've ended up using it for automating a lot of stuff, setting up vips, creating policies, ipsec Vpns and more as once I got the schema I could suss it out.

The one thing I'm struggling with is moving policies , I'm trying to move a policy before another but can't see anywhere in the schema that says how to do this.

I've trailed the web and found a doc suggesting you can do so using put and you add before or after as additional parameters but I can't suss it

Just wondering if you ever managed to do so as I can see it's on your readme as a nice to have.

Would be awesome if you could

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.