I am a Java developer trying to comeup with a Python script that performs application re-deployment in WebSphere. Can someone clarify if the below command is sufficient for the same? I am aware that the 3rd parameter takes many optional parameters. But I am not too sure which of those are relevant in the case where we want to keep the existing mappings intact.
AdminApp.update(appName, 'app', '-operation update -contents "warFilePath" ')
Any help is appreciated.
Thank you.
That's close, although I think the command has to be an array of strings like below. You also have to save the change to make it stick:
AdminApp.update( appName, 'app', [ '-operation', 'update', '-contents', filePath ] )
AdminConfig.save()
You might be interested in this script, which has additional error handling and cases around those core lines.
Related
I'm fairly new at automated testing and setting up Nightwatch but I can already tell my Custom Commands folder is going to get unwieldy sooner or later. I've seen some example nightwatch.json files that use an array for the Custom Commands Path but I can seem to figure it out. Is it possible? Are the examples I've seen out of date?
Here's what I'm attempting to define in nightwatch.json:
"custom_commands_path" : [
"./custom-commands/",
"./custom-commands/login-signup/"
],
If I place my "loginFromHomepage" custom command file in the /custom-commands folder it'll run just fine. If I move the file to /custom-commands/login-signup I get an error stating that the "loginFromHomepage" commands doesn't exist.
What am I missing or not understanding here?
Thanks!
I normally separate my pages by folders. Try something like this
"custom_commands_path": [
"./customCommands/folder1",
"./customCommands/folder2",
"./customCommands/folder"
],
I just realized this was a problem with our setup. For some reason our runner.js file was looking at nightwatch.json AND nightwatch-dev.json for the nightwatchConfig.
I'm not clear on why we're using both but it appears my issue was because I was only adding the additional folders for the custom commands to nightwatch.json and not nightwatch-dev.json.
I want to add bpel.config.auditLevel property to my SOA Web Services but because they are many and because of that, i need to find a way to do this through Web Logic Script Tool(WLST) with simple Jython script. Ive searched in the entire internet with no luck... Maybe this is not possible or i don't know.
Ive find a WLST command called setWebServiceClientStubProperty() but i'm not so sure is that the one i need and there is no examples how to use it soa web services.
Can any one help me with this ?
Thank in advance!
D.T.
You could try something like this :
Connect(USERNAME, PWD, URL)
custom()
cd('oracle.soa.config')
redirect('NULL','false')
list = ls(returnMap='true')
redirect('NULL','true')
for composite in list:
compositeObject = ObjectName(composite)
if compositeObject.getKeyProperty('j2eeType') == 'SCAComposite':
if compositeObject.getKeyProperty('name') == 'YOUCOMPOSITENAME':
compositeProperties = mbs.getAttribute(compositeObject, 'Properties')
compositeProperties[0].set('YOURAUDITLEVEL')
I am translating my application through *.po-files, but the command
mix gettext.extract --merge
generates options only for hardcoded strings.
I have read in documentation that I can't edit *.po-files manually because they are overwritten every time.
How can I translate errors that come from changeset validations and so on?
dgettextfor errors is called in web/views/error_helpers.ex
I'm not sure if these get extracted and merged into errors.po, but that's where you'd likely put them manually if they do not.
I am using guard-jasmine create coverage reports for my javascript app written with backbone js. I would like to exclude the template files from being included in the coverage. Is there a way to do this currently? I have also tried looking through the source and passing the -x option to the intrument command in the coverage.rb file but that doesn't seem to help at all. Any pointers would be appreciated.
Thanks!
There is currently no way of configuring Guard::Jasmine to skip specific files from generating the coverage.
A possible way to add this would be to add something like a coverage_skip option that contains a regex to check it as a preconodition in the coverage tilt template:
return data if file =~ ENV['COVERAGE_SKIP']
Since we do not have access to the Guard::Jasmine options, we need to set it as an environment variable in the server process.
A pull request is heartly welcome ;)
I have a bash script (supports linux/unix), that installs an application.
Instead of executing the script in the terminal, I want to deploy it as a web application.
I want to make a web graphical interface for this script, so that the user can give the necessary inputs in the web forms and when ready,then pass these variables into the bash script to be executed.
This script obvious needs root privileges.
I plan to make it with with tomcat 7 / servlet / jsp. I want to deploy it as .war file.
First, can this be done? Is it possible?
Second, is there any example? I didn't find anything.
Third, any alternative method/better idea?
I'd try tomcat's own CGI support.
http://tomcat.apache.org/tomcat-6.0-doc/cgi-howto.html
Well, it's possible, but keep in mind that sanitizing user input is hard.
What you want to do is use a scripting language or framework (I recommend sinatra), and use a html form to pass arguments to the backend. In the backend, you call your script by passing whatever arguments you want.
Example with sinatra:
post '/whatever' do
# This is dangerous!
`myscript #{params[...]}`
end
Err, but you want this to run on the client side, right?
So you don't really run it as bash on your system, you just template it within your web framework.
If the browser can then display this, it won't just d/l as a file, so you will need to set up a Content-Disposition: attachment header in the response to force a d/l.
You will naturally need the user's cooperation to run this as root on his or her system...