Giter Club home page Giter Club logo

Comments (6)

gabstopper avatar gabstopper commented on July 25, 2024

Hi Etienne,
You can add this parameter during creation as it's a base level attribute of the engine::

engine = FirewallCluster.create(
    name='mycluster',
    cluster_virtual='1.1.1.1',
    network_value='1.1.1.0/24',
    interface_id=0,
    macaddress='02:02:02:02:02:02',
    nodes=[{'address': '1.1.1.2', 'network_value': '1.1.1.0/24', 'nodeid': 1},
           {'address': '1.1.1.3', 'network_value': '1.1.1.0/24', 'nodeid': 2},
           {'address': '1.1.1.4', 'network_value': '1.1.1.0/24', 'nodeid': 3}],
    domain_server_address=['1.1.1.1'],
    zone_ref=zone_helper('Internal'),
    is_cert_auto_renewal=True)

The other option is that if the engine is already created, you can simply update it directly:

engine = Engine('myengine')
engine.update(is_cert_auto_renewal=True)

from fp-ngfw-smc-python.

EtienneMILON avatar EtienneMILON commented on July 25, 2024

Hi David,

On my side the first part of the code you have sent works.
But if I make then an "engine.update()", the option is disable.
And even if I try to update it with "engine.update(is_cert_auto_renewal=True)" it doesn't enable the option.

This is the code I execute:

engine = FirewallCluster.create(
    name="mycluster_test",
    cluster_virtual="1.1.1.1",
    network_value="1.1.1.0/24",
    interface_id=0,
    macaddress="02:02:02:02:02:02",
    nodes=[
        {"address": "1.1.1.2", "network_value": "1.1.1.0/24", "nodeid": 1},
        {"address": "1.1.1.3", "network_value": "1.1.1.0/24", "nodeid": 2},
    ],
    domain_server_address=["1.1.1.1"],
    is_cert_auto_renewal=True,
)
print(engine.is_cert_auto_renewal)

engine.update()
print(engine.is_cert_auto_renewal)

The first print output is False but in the SMC the option is ticked.
The second print output is True but in the SMC the option is unticked.
I use fp-NGFW-SMC-python 0.7.0b23 and SMC 6.5.14.

Etienne

from fp-ngfw-smc-python.

thomasdevulder avatar thomasdevulder commented on July 25, 2024

Hello Etienne,

Currently is_cert_auto_renewal attribute is not fully supported.
But it is possible to use it in the create method using extra_opts parameter:

Layer3Firewall.create(name=engine_name,
                      mgmt_ip="192.168.10.1",
                      mgmt_network="192.168.10.0/24",
                      ntp_settings=ntp,
                      extra_opts={"is_cert_auto_renewal": True}
                      )

engine = Layer3Firewall(engine_name)
print("is_cert_auto_renewal={}".format(engine.is_cert_auto_renewal))
print("update to false...")
engine.update(is_cert_auto_renewal=False)
print("is_cert_auto_renewal={}".format(Layer3Firewall(engine_name).is_cert_auto_renewal))

This attribute will be supported soon.

Regards,
Thomas

from fp-ngfw-smc-python.

sophalsun69 avatar sophalsun69 commented on July 25, 2024

Hello All
So at this point , no way to update the cert_auto_renewal on an existing engine , but do you have a date for this attibute ?

Best regards

from fp-ngfw-smc-python.

lilianValeroFp avatar lilianValeroFp commented on July 25, 2024

It will be available in the next release (1.0.21), hoping beginning of the next year.

from fp-ngfw-smc-python.

lilianValeroFp avatar lilianValeroFp commented on July 25, 2024

Finally, there was a confusion in attributes there. You are pointing from your screenshot an InternalGateway setting 'auto_certificate' but the attribute, you are referring to 'is_cert_auto_renewal', is the engine advanced settings 'Automated Node Certificate Renewal'. So you should be able to update both from the current api.

from fp-ngfw-smc-python.

Related Issues (20)

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.