Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tried importing networkgroup and this is the json error #2

Open
john-babio opened this issue Feb 20, 2021 · 2 comments
Open

Tried importing networkgroup and this is the json error #2

john-babio opened this issue Feb 20, 2021 · 2 comments

Comments

@john-babio
Copy link

{
"error": {
"category": "FRAMEWORK",
"messages": [
{
"description": "The group should have atleast one object reference or a literal as override is not enabled."
}
],
"severity": "ERROR"
}
}
s

@mapp-john
Copy link
Owner

Can you provide an example input to be able to recreate please?
Also, were you using tool #3?

@mkioga
Copy link

mkioga commented Nov 28, 2022

I am trying to add an FMC NetworkGroup object using ansible and got error message above "The group should have atleast one object reference or a literal as override is not enabled".
It looks like we need to add at least one host object to this network group object while creating it.
Anyone knows how to do that in ansible ?

Here is the ansible code I am using

- name: POST to create group object "objects_networkgroups_s1""
  ansible.builtin.uri:
    url: "https://{{server_ip}}/api/fmc_config/v1/domain/sdfgc-edfd-dddd-4444-sksksksksksks/object/networkgroups"
    method: POST
    headers:
      "X-auth-access-token": "{{ auth_access_token }}"
      Connection: keepalive
    body: {
            name: "{{ objects_networkgroups_s1 }}",
            type: "{{ object_type }}",
            #value: "{{ objects_list_inside_ip_s1 }}",
            description: "{{ objects_networkgroups_s1 + ' added via API by Ansible' }}"
          }
    body_format: json
    return_content: yes
    status_code: 201
  register: added_objects_networkgroups_s1
  vars:
      object_type: "NetworkGroup"

- name: Print all GET results from creation of Network group object added_objects_networkgroups_s1
  ansible.builtin.debug:
    msg: "{{ added_objects_networkgroups_s1 }}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants