Skip to content

More examples #6

@eurodomenii

Description

@eurodomenii

Modify existing value example

# Find the specified ACL
acl_instance = the_fe_section.acl(the_acl_name)   # return config.Acl
acl_instance.value = "hdr(host) -i modified.example.com"

Delete acl record example

# Get all the ACLs defined in the frontend section
acls = the_fe_section.acls()   # return list(config.Acl)
# Find the specified ACL
acl_instance = the_fe_section.acl(the_acl_name)   # return config.Acl
acls.remove(acl_instance)

Append example failure

the_fe_section.acls().append(config.ACL(acl_name, acl_value)) # append the ACL into the frontend section fails with NameError: name 'config' is not defined

Finally , a small observation

for usebe in usebackends:
    # Get the using backend name, operator, condition
    print usebe.backend_name, usebe.operator, backend_condition

Should be usebe.backend_condition

Btw, nice piece of software!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions