I'm trying to introduce a new directive which takes either a string or a variable as input and saves the values on configuration struct for later user in my code. I found that some directives in nginx are using ngx_http_compile_complex_value(&ccv) to compile the variables and ngx_http_complex_value() to get the original value of the directive's argument during the runtime. Similarly, some other directives are using ngx_http_script_compile(&sc) and ngx_http_script_run() to achieve the same.
I have found some documentation about scripts and complex values in nginx but I'm still not clear about the difference between these two.
Can anyone help me understand the difference and when to use complex_value vs script?
Related
I am wanting to call the following URL in my Jitterbit HTTP target:
https://xxx.visualstudio.com/DefaultCollection/_apis/wit/workitems/[vstsId]?api-version=1.0
where [vstsId] is dynamic and should be supplied from a global variable.
Is it possible to have dynamic urls in the target?
I could make the whole url dynamic if need be.
Any ideas? (I'm using javascript scripting rather than the Jitterbit scripting)
Thanks
Martin
Yes, you have it typed out correctly. At the beginning of your operation chain (or at the point where you know what $vstsld should be, and you can declare it), simply add a script to declare it, or add it into a transformation where you get the data from. At any point after that, in the current operation chain, you can access the value in that variable. Just make sure you set it with the $ symbol, which makes it global.
$vstsld='some value';
As W3bguy said. you call it in the script as $vstsld. Now you can pass in a test value data into your variable as well. just add the curly brackets inside your variable like the below
example
https://xxx.visualstudio.com/DefaultCollection/_apis/wit/workitems/[vstsId{1234}]?api-version=1.0
I am trying various different options of building Asterisk 11 and these will be deployed on various servers. They are all built from the same sources and have what I presume to be some sort of checksum embedded in the version ID (26dd464).
In order to distinguish the various versions of the executable I would like to add my own version number or string on similar. I note that /usr/src/asterisk/main/version.c specifies a const char [] variable asterisk_version, but if I manually edit this it gets overwritten as part of the make process. Is there a sensible way I could specify some sort of identifying label (e.g. as a parameter passed to make or some such)?
In /usr/src/asterisk/build_tools/make_version_c you can specify it. This script overwrites the file you've mentioned (/usr/src/asterisk/utils/version.c).
I have two separate paths defined in my schema:
/team/{id}/people/{modified}:
get:
/team/{id}/people/{person_id}:
delete:
So these are two completely separate "things" because one is a get and one is a delete, and the second parameter name doesn't make sense as something generic. The 'get' is passing in a modified timestamp at that location and the delete is passing in an actual person identifier.
This shows up properly in Swagger UI, but the Swagger Editor is giving an error telling me that an equivalent path already exists. It's hard to just ignore it because that scatters errors all over the file making it hard to debug real issues.
What's the solution to something like this?
you should be use /team/{id}/people/delete/{person_id}:
I can think of workarounds on how to get this working however I'm interested in finding out if there's a solution to this specific problem.
I've got a go program which requires a json string arguement:
go run main.go "{ \"field\" : \"value\" }"
No problems so far. However, am I able to run from the command line if one of the json values is another json string?
go run main.go "{ \"json-string\" : \"{\"nestedfield\" : \"nestedvalue\"}\" }"
It would seem that adding escape characters incorrectly matches up the opening and closing quotes. Am I minuderstanding how this is done or is it (and this is the side I'm coming down on) simply not possible?
To reiterate, this is a question that has piqued my curiosity - I'm aware of alternative approaches - I'm hoping for input related to this specific problem.
Why don't you just put your json config to the file and provide config file name to your application using flag package
Based on the feedback from wiredeye I went down the argument route instead. I've modified the program to run on:
go run main.go field:value field2:value json-string:"{\"nestedfield\":nestedvalue}"
I can then iterate over the os.Args and get the nested json within my program. I'm not using flags directly as I don't know the amount of inputs into the program which would have required me to use duplicate flags (not supported) or parse the flag to a collection (doesn't seem to be supported).
Thanks wiredeye
Robot Framework allows you to import multiple resource files containing keywords with the same names, and to call them using their full name to differentiate between them. For example, if you have Resource1.robot that has a keyword called "Test Keyword" that does some action, and Resource2.robot that also has a keyword called "Test Keyword" that does a different action, when you import both resources into a test suite, your test cases can access those keywords with the syntax Resource1.Test Keyword or Resource2.Test Keyword depending on the functionality that you want.
Is there a way to do that with variables? I have two resource files - patient_records_resource.robot and patient_search_resource.robot. patient_records_resource defines a variable ${LAST NAME EDIT} | name=lname, and patient_search_resource defines a variable with the same name ${LAST NAME EDIT} | id=last-name. I'm running into the problem where a test case imports both of those files, and needs to access both of those edit boxes at different points, and consistently picks the wrong one. I have tried things like patient_search_resource.LAST NAME EDIT with no success, but that's approximately what I'm looking for.
I know I could just rename one of them, but I'd like to use that as a last resort solution. Everyone on my team makes sure to create unique variable names within a single resource file, but coming up with unique variable names across the whole test suite to avoid these collisions would add some overhead that we don't want.
There is no way to do that with variables.
All variables from resource files have the same priority. If multiple variables have the same name then only the one that was imported first is taken into use. [source]
Your only options are:
Splitting the suite with both imports into two sub-suites, ensuring that each sub-suite only imports one of the resources.
Your last resort solution: modifying your variable names to all be unique.
I agree that the latter option adds a bothersome amount of overhead, but, until RF changes the way it handles variables, it's probably your best option. Personally, I prefix all variables with a sequence of letters unique to the resource file (e.g. a resource named "Member_Central_Logging_Functions" might have all variables prefixed with MCLF).