-
this code that I wrote isnt inserting hosts to hostgroup:
what to do? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @NSH531 - The code posted above does not reference the performGroupAction operation anywhere within the source. Since this operation is not called, the host is not added to the host group. You should also move your import of the Uber Class to the top of this file and outside of the This code also still creates instances of objects, but then references the FalconPy module directly instead of using the created object. This code will not work as you are not authenticating to the API properly: tr=[falconpy.HostGroup.query_host_groups(parameters=[res0]),falconpy.HostGroup.query_host_groups(parameters=[res1])] Thank you for the question!
|
Beta Was this translation helpful? Give feedback.
-
I did this but still throws errors:
tnx |
Beta Was this translation helpful? Give feedback.
Hi @NSH531 -
The code posted above does not reference the performGroupAction operation anywhere within the source. Since this operation is not called, the host is not added to the host group.
You should also move your import of the Uber Class to the top of this file and outside of the
hg
method as you are referencing this object in other methods.This code also still creates instances of objects, but then references the FalconPy module directly instead of using the created object. This code will not work as you are not authenticating to the API properly:
Thank you for the q…