When I use ReferenceField with ReferenceWidget, there are always options which refer to real objects, and one, on the top, named <No reference>. It is possible to hide that option?
Yes, set the required property of the field to True.
ReferenceField(
name='references',
required=True,
# ...
)
Related
*When i run my robot tests it says Multiple keywords with name 'Set
Variable Value for' found. Give the full name of the keyword you want to use:
step_definitions.Set Variable Value for
variable_handler.Set Variable Value for
It does this for all the keywords mentioned in variable_handler.py
Is there something that i am missing? Do we need to give the name
of python file that has that keyword?*
found not much online. have added the library in the settings.
Variable_handler.py
```#keyword(name='Set Variable Value for')
def Set_Variable_Value_for(tag, value):
my_token_file = 'Resources/written_variables.yml'
data = None
with open(my_token_file, 'r') as testData:
data = yaml.load(testData)
data[tag] = value
with open(my_token_file, 'w') as writeTestData:
print(ruamel.yaml.dump(data, writeTestData,
Dumper=ruamel.yaml.RoundTripDumper))```
step_definitions.py
'''#keyword(name='Set Start Time for Test')
def Test_Start_Time():
tz = timezone('UTC')
Time_Now = datetime.now(tz)
naive_date = Time_Now.replace(tzinfo=None)
Set_Variable_Value_for('START_TIME', naive_date)```
Test.robot
'''Create a New Member
[Documentation] Add a New Member
[Tags] CreateMember MemberAndProjectCreationFlow SanityTest
All
Login to Platform Analytics
Verify Member List Page Elements
Click on Add Member
Add Member Breadcrumb is displayed
Add New Member Details
Verify New Member Creation
Search for the Member ${NEW_MEMBER_NAME_GLOBAL}
Search the Results and Go To ${NEW_MEMBER_NAME_GLOBAL}
${Member_Row_Locator} ${Member_Column}
${MEMBER_HOMEPAGE} = Replace String ${MEMBER_HOME}
MEMBERHOME ${NEW_MEMBER_SCHEMA_GLOBAL}
Set Global Variable ${MEMBER_HOMEPAGE_GLOBAL}
${MEMBER_HOMEPAGE}
đźš©Set Variable Value for MEMBER_HOMEPAGE ${MEMBER_HOMEPAGE}
Log To Console Member Creation Successful.```
It should work without specifying the python file that contains
the key word. I have imported all the things required like variable_handler and step definitions
The root of the matter is that you have two or more keywords with the same name imported into the test. When you try to run the keyword Set Variable Value for, robot doesn't know which of the keywords to run. It has no way of knowing if the two names represent two different functions or the same function in two different libraries.
You have three possible solutions:
As the error suggests, you can specify the full path to the keyword, such as step_definitions.Set Variable Value
You tell robot to give precedence to one library over the other using the built-in keyword Set Library Search Order.
You can modify your libraries so that you don't have duplicate keyword names
For more information see Handling keywords with same names in the robot framework user guide.
I am trying to create the source type image from python script in obs. Want to know proper steps to create source in script. I already checked, no proper doc for python scripting available.
obs.obs_source_create('banner-image','xyz')
obs.obs_source_create('banner-image','xyz')
Logs
TypeError: obs_source_create() takes exactly 4 arguments (2 given)
I want to create source type image from scrip & add that source to my current scene
This may be a simple FFI implementation, so try:
obs.obs_source_create('banner-image', 'xyz', None, None)
Source: First hit on Google when searching for "obs_source_create":
https://obsproject.com/docs/reference-sources.html
Excerpt:
obs_source_t *obs_source_create(const char *id, const char *name, obs_data_t *settings, obs_data_t *hotkey_data)
Creates a source of the specified type with the specified settings.
The “source” context is used for anything related to presenting or modifying video/audio. Use obs_source_release to release it.
Parameters:
id – The source type string identifier
name – The desired name of the source. If this is not unique, it will be made to be unique
settings – The settings for the source, or NULL if none
hotkey_data – Saved hotkey data for the source, or NULL if none
Returns:
A reference to the newly created source, or NULL if failed
By using ant modulegen, hybris will create the seven extensions like cockpits,core,facades,storefront,test,initial data and fullfilmentprocess.
Is there anyway to create more than this extensions.?
Thank in advance.
With the 'ant modulegen' command you are able to generate a package of extension for a specific requirement. The targets you can select are:
commercewebservices, acceleratorordermanagement, [accelerator], b2baccelerator, chinaaccelerator
[input] Please choose a template for generation.
[input] Press [Enter] to use the default value (commercewebservices,acceleratorordermanagement, [accelerator], b2baccelerator, chinaaccelerator)
The default one [accelerator] will generate exactly those seven extensions you mentioned before. At least, with the modulegen you are creating a 'bundle' of extensions that you will need for your specific requirements. Those bundles are always inherit from the yextension templates. Here are a list of those yextensions:
yempty
ycockpit
yaddon
ybackoffice
yacceleratorcore
yacceleratorfacades
yacceleratorstorefront
yacceleratorcockpits
yacceleratorinitialdata
yacceleratortest
ycommercewebservices
yacceleratorordermanagement
yacceleratorfulflmentprocess
yatddtests
ycommercewebserviceshmc
ycommercewebservicestest
ygroovy
yoccaddon
ysaporderfulfillment
ysapordermgmtb2baddon
ysapproductconfigb2baddon
yscala
yhacext
So you are able to create single extensions with the following command 'ant extgen'. Here is also the console output to it:
[input] Please choose a template for generation.
[input] Press [Enter] to use the default value (ywebservices, ysmarteditmodule, yoccaddon, yhacext, [yempty], ycommercewebservices, ycommercewebservicestest, yatddtests, yaddon, yacceleratorordermanagement, yacceleratorfulfilmentprocess, yacceleratorfractusfulfilmentprocess, yscala, ygroovy, ycockpit, ybackoffice, testfulfilmentprocess, ycommercewebserviceshmc, ycmssmartedit, teststorefront, yacceleratorstorefront, ychinaacceleratorstorefront)
BR
I wanted to add things such as Size, BuildHost, BuildDate etc in rpm query but adding this thing in spec file results in unknown tag?? How can I do this so that these things are reflected when i give the rpm query command?
These tags are determined when the package is built; they cannot be forced to specific values.
For example BuildHost is hardcoded in rpmbuild and cannot be changed. There is RFE https://bugzilla.redhat.com/show_bug.cgi?id=1309367 to allow it modify from command line. But right now you cannot change it by any tag in spec file nor by passing some option on command line to rpmbuild.
I assume it will be very similar to other values you specified.
RPM5 permits arbitrary unique tag names to be added to header metadata.
The tag names are configured in a colon separated list in a macro. Then the new tags can be used in spec files and can be extracted using --queryformat.
All arbitrary tags are string (or string array) valued.
I have the current problem that many of my employees in Hybris have the HMC login attribute set to inherit from group, which means that they can't log in to the HMC. This was due to that I used an impex script that set new users to this a while ago. I try now to write an impex script that updates all employees to have HMC access instead. I found the <ignore> tag to be interesting on the Wiki which states that "There is a special value that makes the ImpEx skip the entry and leave the item value at the one it currently is." (https://wiki.hybris.com/display/release4/ImpEx+Syntax). So when I am trying to use the following script:
UPDATE Employee;UID[unique=true];password;description;name;groups(uid);sessionLanguage(isocode);sessionCurrency(isocode);hmcLoginDisabled[default=false]
;<ignore>;<ignore>;<ignore>;<ignore>;<ignore>;<ignore>;<ignore>
I think it should ignore all current values and set hmcLoginDisabled to false. But HAC gives me the following output:
UPDATE Employee;UID[unique=true];password;description;name;groups(uid);sessionLanguage(isocode);sessionCurrency(isocode);hmcLoginDisabled[default=false]
,,no existing item found for update;<ignore>;<ignore>;<ignore>;<ignore>;<ignore>;<ignore>;<ignore>
27.03.2014 15:26:38: ERROR: line 3 at main script: Can not resolve any more lines ... Aborting further passes (at pass 2). Finally could not import 1 lines!
27.03.2014 15:26:38: ERROR: line 3 at main script: Can not resolve any more lines ... Aborting further passes (at pass 2). Finally could not import 1 lines!
Anyone that has any idea on how to write an impex script to solve this?
Just considered Nevins post and came up with this final solution that actually worked:
UPDATE Employee[batchmode=true];itemtype(code)[unique=true];hmcLoginDisabled[default=false]
;Employee
You can just leave the fields blank if you don't want to update the value.