I need to use the /stop-release REST API call from within a deployment process. Since I do RA development on a different ROC than our Production ROC, I need to parameter-ize the URI used in the REST call.
Could you create an environment parameter for the NAC server name or Ip address?
I thought about that but really don't want to do that. We anticipate having lots of environments and don't want that to be another env param that has to get populated in everyone. Besides, it seems a bit sad to have to fill in a parameter value on a page whose own url includes the same value. It really seems like it should be available programatically... that just made me think. It's ugly, but I suppose I could run a bash script/command on the ROC to get the value. I guess, I'll give it a go.
I agree it would be good if we supplied this as a default value perhaps we can come up with a list of useful parameter values that can be added to the product and create an idea to get them added to the product. In the meantime it would be good to see how others have addressed this type of problem. The nac name and IP address are stored in the DB so perhaps you could also use the database action to run a Sall query?
I agree there must both be other values that could be supplied by default and other users that have solved this problem before. I too would like to know how others have addressed it.
For the time being this problem has been made moot. For other reasons, I have decided to change how I am approaching the related actions/flows, and eliminated the dependency on running a REST API call against CARA from within CARA.
That being said, for the benefit of others, how I solved it before changing direction was as follows:
When the command line action runs, it runs on the CARA Management Server (ROC host) and captures the servers ip address to a parameter. I could then use that parameter later in a REST call action.
BTW Keith-Puzey-CA, I think I still like your idea of querying the database better than what I just described and would look into it if I still needed that solution.
I think this idea will help in this scenario, perhaps we should encourage more on the community to vote this idea up.
Defining global cross application parameters inside RA (parameter structure)
Thanks Keith-Puzey-CA. I voted that idea up and definitely encourage others to do so too. I think there is also value in your other suggestion of creating a list of new built-in parameters that we would like to see. I started it on:Additional Built-In Parameters That Would Be Valuable
You can query the execution server JMX for retrieving the current NAC IP address
Using the action access URL you can access the NES URL (Need to provide user/pass with basic authentication) :http://NES_HOSTNAME:20203/invoke?operation=getConnectedNacHost&objectname=ExecutionServer%3Ainfo%3DBroker
Next you can search in the output for "Result value" and you will get the NAC IP address