body_hash
stringlengths
64
64
body
stringlengths
23
109k
docstring
stringlengths
1
57k
path
stringlengths
4
198
name
stringlengths
1
115
repository_name
stringlengths
7
111
repository_stars
float64
0
191k
lang
stringclasses
1 value
body_without_docstring
stringlengths
14
108k
unified
stringlengths
45
133k
e625a6fedcfe581609fe7fadaab9964bd6b866b93734d89dd447df82b586abe9
def connect_write_port(self, dual_port_memories): 'Connects the write port of a list of dual port memories to this.\n\n Returns a list of statements that perform the connection.\n ' assert (len(dual_port_memories) == len(self.w_en)), f'Memory length does not match: {dual_port_memories}, {len(self.w_en)}' statement_list = [] for (w_en, dp) in zip(self.w_en, dual_port_memories): statement_list.extend([dp.w_en.eq(w_en), dp.w_addr.eq(self.w_addr), dp.w_data.eq(self.w_data)]) return statement_list
Connects the write port of a list of dual port memories to this. Returns a list of statements that perform the connection.
proj/mnv2_first/gateware/store.py
connect_write_port
keadwen/CFU-Playground
240
python
def connect_write_port(self, dual_port_memories): 'Connects the write port of a list of dual port memories to this.\n\n Returns a list of statements that perform the connection.\n ' assert (len(dual_port_memories) == len(self.w_en)), f'Memory length does not match: {dual_port_memories}, {len(self.w_en)}' statement_list = [] for (w_en, dp) in zip(self.w_en, dual_port_memories): statement_list.extend([dp.w_en.eq(w_en), dp.w_addr.eq(self.w_addr), dp.w_data.eq(self.w_data)]) return statement_list
def connect_write_port(self, dual_port_memories): 'Connects the write port of a list of dual port memories to this.\n\n Returns a list of statements that perform the connection.\n ' assert (len(dual_port_memories) == len(self.w_en)), f'Memory length does not match: {dual_port_memories}, {len(self.w_en)}' statement_list = [] for (w_en, dp) in zip(self.w_en, dual_port_memories): statement_list.extend([dp.w_en.eq(w_en), dp.w_addr.eq(self.w_addr), dp.w_data.eq(self.w_data)]) return statement_list<|docstring|>Connects the write port of a list of dual port memories to this. Returns a list of statements that perform the connection.<|endoftext|>
8f996b76f883180611bb97ad60e8fe3543222f22fe12211bf769ab3932b884a4
def connect_read_ports(self, dual_port_memories): 'Helper method to connect a list of dual port memories to self.\n\n Returns a list of statements that perform the connection.\n ' result = [] for (mem_addr, mem_data, dpm) in zip(self.mem_addrs, self.mem_datas, dual_port_memories): result += [dpm.r_addr.eq(mem_addr), mem_data.eq(dpm.r_data)] return result
Helper method to connect a list of dual port memories to self. Returns a list of statements that perform the connection.
proj/mnv2_first/gateware/store.py
connect_read_ports
keadwen/CFU-Playground
240
python
def connect_read_ports(self, dual_port_memories): 'Helper method to connect a list of dual port memories to self.\n\n Returns a list of statements that perform the connection.\n ' result = [] for (mem_addr, mem_data, dpm) in zip(self.mem_addrs, self.mem_datas, dual_port_memories): result += [dpm.r_addr.eq(mem_addr), mem_data.eq(dpm.r_data)] return result
def connect_read_ports(self, dual_port_memories): 'Helper method to connect a list of dual port memories to self.\n\n Returns a list of statements that perform the connection.\n ' result = [] for (mem_addr, mem_data, dpm) in zip(self.mem_addrs, self.mem_datas, dual_port_memories): result += [dpm.r_addr.eq(mem_addr), mem_data.eq(dpm.r_data)] return result<|docstring|>Helper method to connect a list of dual port memories to self. Returns a list of statements that perform the connection.<|endoftext|>
ea6fb1ba958cd94a9f8639f9bdb192a7734e759b5207d6ce120a7a0f62e176da
def connect(self, input_store): 'Connect to self to input_store.\n\n Returns a list of statements that performs the connection.\n ' return [input_store.w_data.eq(self.w_data), input_store.w_en.eq(self.w_en), self.w_ready.eq(input_store.w_ready)]
Connect to self to input_store. Returns a list of statements that performs the connection.
proj/mnv2_first/gateware/store.py
connect
keadwen/CFU-Playground
240
python
def connect(self, input_store): 'Connect to self to input_store.\n\n Returns a list of statements that performs the connection.\n ' return [input_store.w_data.eq(self.w_data), input_store.w_en.eq(self.w_en), self.w_ready.eq(input_store.w_ready)]
def connect(self, input_store): 'Connect to self to input_store.\n\n Returns a list of statements that performs the connection.\n ' return [input_store.w_data.eq(self.w_data), input_store.w_en.eq(self.w_en), self.w_ready.eq(input_store.w_ready)]<|docstring|>Connect to self to input_store. Returns a list of statements that performs the connection.<|endoftext|>
df3f23b35512b1efcace35c48ea916c7ff96eec158dd52e93da68132a8bd515f
@pytest.mark.smoke_tests def test_info_tab_is_active_by_default(self, program, selenium): 'Verifies Info tab is active by default.' info_page = webui_service.ProgramsService(selenium).open_info_page_of_obj(program) active_tab_name = info_page.top_tabs.active_tab.name assert (active_tab_name == 'Program Info')
Verifies Info tab is active by default.
test/selenium/src/tests/test_program_page.py
test_info_tab_is_active_by_default
Hawkmoon269/ggrc-core
2
python
@pytest.mark.smoke_tests def test_info_tab_is_active_by_default(self, program, selenium): info_page = webui_service.ProgramsService(selenium).open_info_page_of_obj(program) active_tab_name = info_page.top_tabs.active_tab.name assert (active_tab_name == 'Program Info')
@pytest.mark.smoke_tests def test_info_tab_is_active_by_default(self, program, selenium): info_page = webui_service.ProgramsService(selenium).open_info_page_of_obj(program) active_tab_name = info_page.top_tabs.active_tab.name assert (active_tab_name == 'Program Info')<|docstring|>Verifies Info tab is active by default.<|endoftext|>
e5266acdfaff9ec02a59533174cc423c7306fdd718db03cc0a5c0e4fdedbdf28
@pytest.mark.smoke_tests def test_permalink(self, selenium, program): 'Verify url is copied to clipboard.' info_page = webui_service.ProgramsService(selenium).open_info_page_of_obj(program) info_page.three_bbs.select_get_permalink() base.AnimatedComponent(selenium, [locator.WidgetInfoProgram.ALERT_LINK_COPIED], wait_until_visible=True) info_page.three_bbs.select_edit() modal = object_modal.get_modal_obj('program', selenium) modal.title_field.set(keys.Keys.CONTROL, 'v') assert (modal.title_field.value == program.url)
Verify url is copied to clipboard.
test/selenium/src/tests/test_program_page.py
test_permalink
Hawkmoon269/ggrc-core
2
python
@pytest.mark.smoke_tests def test_permalink(self, selenium, program): info_page = webui_service.ProgramsService(selenium).open_info_page_of_obj(program) info_page.three_bbs.select_get_permalink() base.AnimatedComponent(selenium, [locator.WidgetInfoProgram.ALERT_LINK_COPIED], wait_until_visible=True) info_page.three_bbs.select_edit() modal = object_modal.get_modal_obj('program', selenium) modal.title_field.set(keys.Keys.CONTROL, 'v') assert (modal.title_field.value == program.url)
@pytest.mark.smoke_tests def test_permalink(self, selenium, program): info_page = webui_service.ProgramsService(selenium).open_info_page_of_obj(program) info_page.three_bbs.select_get_permalink() base.AnimatedComponent(selenium, [locator.WidgetInfoProgram.ALERT_LINK_COPIED], wait_until_visible=True) info_page.three_bbs.select_edit() modal = object_modal.get_modal_obj('program', selenium) modal.title_field.set(keys.Keys.CONTROL, 'v') assert (modal.title_field.value == program.url)<|docstring|>Verify url is copied to clipboard.<|endoftext|>
f6b68179d3ddcc85c5fea2c6c111760a34f6a729084a895acea10998f9d3c466
@pytest.mark.smoke_tests def test_create_program(self, selenium): 'Tests program creation via UI.' program = entities_factory.ProgramsFactory().create() actual_program = webui_service.ProgramsService(selenium).create_obj_and_get_obj(program) rest_program = rest_facade.get_obj(actual_program) program.update_attrs(created_at=rest_program.created_at, updated_at=rest_program.updated_at, modified_by=users.current_user(), slug=rest_program.slug, url=rest_program.url).repr_ui() self.general_equal_assert(program, actual_program, 'custom_attributes')
Tests program creation via UI.
test/selenium/src/tests/test_program_page.py
test_create_program
Hawkmoon269/ggrc-core
2
python
@pytest.mark.smoke_tests def test_create_program(self, selenium): program = entities_factory.ProgramsFactory().create() actual_program = webui_service.ProgramsService(selenium).create_obj_and_get_obj(program) rest_program = rest_facade.get_obj(actual_program) program.update_attrs(created_at=rest_program.created_at, updated_at=rest_program.updated_at, modified_by=users.current_user(), slug=rest_program.slug, url=rest_program.url).repr_ui() self.general_equal_assert(program, actual_program, 'custom_attributes')
@pytest.mark.smoke_tests def test_create_program(self, selenium): program = entities_factory.ProgramsFactory().create() actual_program = webui_service.ProgramsService(selenium).create_obj_and_get_obj(program) rest_program = rest_facade.get_obj(actual_program) program.update_attrs(created_at=rest_program.created_at, updated_at=rest_program.updated_at, modified_by=users.current_user(), slug=rest_program.slug, url=rest_program.url).repr_ui() self.general_equal_assert(program, actual_program, 'custom_attributes')<|docstring|>Tests program creation via UI.<|endoftext|>
86c8a9784dca6ae6ba19b8c361815a9398871485ca8f3cda1f9f57a9db99a482
@pytest.mark.smoke_tests def test_edit_program(self, program, selenium): 'Tests if data is saved after editing program info page edit modal.' new_title = ('[EDITED] ' + program.title) program_service = webui_service.ProgramsService(selenium) program_service.edit_obj(program, title=new_title) actual_program = program_service.get_obj_from_info_page(program) program.update_attrs(title=new_title, updated_at=rest_facade.get_obj(actual_program).updated_at).repr_ui() self.general_equal_assert(program, actual_program)
Tests if data is saved after editing program info page edit modal.
test/selenium/src/tests/test_program_page.py
test_edit_program
Hawkmoon269/ggrc-core
2
python
@pytest.mark.smoke_tests def test_edit_program(self, program, selenium): new_title = ('[EDITED] ' + program.title) program_service = webui_service.ProgramsService(selenium) program_service.edit_obj(program, title=new_title) actual_program = program_service.get_obj_from_info_page(program) program.update_attrs(title=new_title, updated_at=rest_facade.get_obj(actual_program).updated_at).repr_ui() self.general_equal_assert(program, actual_program)
@pytest.mark.smoke_tests def test_edit_program(self, program, selenium): new_title = ('[EDITED] ' + program.title) program_service = webui_service.ProgramsService(selenium) program_service.edit_obj(program, title=new_title) actual_program = program_service.get_obj_from_info_page(program) program.update_attrs(title=new_title, updated_at=rest_facade.get_obj(actual_program).updated_at).repr_ui() self.general_equal_assert(program, actual_program)<|docstring|>Tests if data is saved after editing program info page edit modal.<|endoftext|>
6a2b2d0b76da1f6f92345e1e2f5eb0f6a266235169067973d8456874a94e371c
def test_without_localsite(self): 'Testing RepositoryForm without a LocalSite' local_site = LocalSite.objects.create(name='test') local_site_user = User.objects.create_user(username='testuser1') local_site.users.add(local_site_user) global_site_user = User.objects.create_user(username='testuser2') local_site_group = self.create_review_group(name='test1', invite_only=True, local_site=local_site) global_site_group = self.create_review_group(name='test2', invite_only=True) local_site_account = HostingServiceAccount.objects.create(username='local-test-user', service_name='test', local_site=local_site) global_site_account = HostingServiceAccount.objects.create(username='global-test-user', service_name='test') form = RepositoryForm() self.assertIsNone(form.limited_to_local_site) self.assertIn('local_site', form.fields) self.assertEqual(list(form.fields['users'].queryset), [local_site_user, global_site_user]) self.assertEqual(list(form.fields['review_groups'].queryset), [local_site_group, global_site_group]) self.assertEqual(list(form.fields['hosting_account'].queryset), [local_site_account, global_site_account]) form = RepositoryForm(data={'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none', 'users': [global_site_user.pk], 'review_groups': [global_site_group.pk]}) self.assertIsNone(form.limited_to_local_site) self.assertIn('local_site', form.fields) self.assertEqual(list(form.fields['users'].queryset), [local_site_user, global_site_user]) self.assertEqual(list(form.fields['review_groups'].queryset), [local_site_group, global_site_group]) self.assertIsNone(form.fields['users'].widget.local_site_name) self.assertEqual(list(form.fields['hosting_account'].queryset), [local_site_account, global_site_account]) self.assertTrue(form.is_valid()) self.assertEqual(list(form.fields['users'].queryset), [local_site_user, global_site_user]) self.assertEqual(list(form.fields['review_groups'].queryset), [local_site_group, global_site_group]) self.assertEqual(list(form.fields['hosting_account'].queryset), [local_site_account, global_site_account]) repository = form.save() form.save_m2m() self.assertIsNone(repository.local_site) self.assertEqual(list(repository.users.all()), [global_site_user]) self.assertEqual(list(repository.review_groups.all()), [global_site_group])
Testing RepositoryForm without a LocalSite
reviewboard/scmtools/tests/test_repository_form.py
test_without_localsite
amalik2/reviewboard
2
python
def test_without_localsite(self): local_site = LocalSite.objects.create(name='test') local_site_user = User.objects.create_user(username='testuser1') local_site.users.add(local_site_user) global_site_user = User.objects.create_user(username='testuser2') local_site_group = self.create_review_group(name='test1', invite_only=True, local_site=local_site) global_site_group = self.create_review_group(name='test2', invite_only=True) local_site_account = HostingServiceAccount.objects.create(username='local-test-user', service_name='test', local_site=local_site) global_site_account = HostingServiceAccount.objects.create(username='global-test-user', service_name='test') form = RepositoryForm() self.assertIsNone(form.limited_to_local_site) self.assertIn('local_site', form.fields) self.assertEqual(list(form.fields['users'].queryset), [local_site_user, global_site_user]) self.assertEqual(list(form.fields['review_groups'].queryset), [local_site_group, global_site_group]) self.assertEqual(list(form.fields['hosting_account'].queryset), [local_site_account, global_site_account]) form = RepositoryForm(data={'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none', 'users': [global_site_user.pk], 'review_groups': [global_site_group.pk]}) self.assertIsNone(form.limited_to_local_site) self.assertIn('local_site', form.fields) self.assertEqual(list(form.fields['users'].queryset), [local_site_user, global_site_user]) self.assertEqual(list(form.fields['review_groups'].queryset), [local_site_group, global_site_group]) self.assertIsNone(form.fields['users'].widget.local_site_name) self.assertEqual(list(form.fields['hosting_account'].queryset), [local_site_account, global_site_account]) self.assertTrue(form.is_valid()) self.assertEqual(list(form.fields['users'].queryset), [local_site_user, global_site_user]) self.assertEqual(list(form.fields['review_groups'].queryset), [local_site_group, global_site_group]) self.assertEqual(list(form.fields['hosting_account'].queryset), [local_site_account, global_site_account]) repository = form.save() form.save_m2m() self.assertIsNone(repository.local_site) self.assertEqual(list(repository.users.all()), [global_site_user]) self.assertEqual(list(repository.review_groups.all()), [global_site_group])
def test_without_localsite(self): local_site = LocalSite.objects.create(name='test') local_site_user = User.objects.create_user(username='testuser1') local_site.users.add(local_site_user) global_site_user = User.objects.create_user(username='testuser2') local_site_group = self.create_review_group(name='test1', invite_only=True, local_site=local_site) global_site_group = self.create_review_group(name='test2', invite_only=True) local_site_account = HostingServiceAccount.objects.create(username='local-test-user', service_name='test', local_site=local_site) global_site_account = HostingServiceAccount.objects.create(username='global-test-user', service_name='test') form = RepositoryForm() self.assertIsNone(form.limited_to_local_site) self.assertIn('local_site', form.fields) self.assertEqual(list(form.fields['users'].queryset), [local_site_user, global_site_user]) self.assertEqual(list(form.fields['review_groups'].queryset), [local_site_group, global_site_group]) self.assertEqual(list(form.fields['hosting_account'].queryset), [local_site_account, global_site_account]) form = RepositoryForm(data={'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none', 'users': [global_site_user.pk], 'review_groups': [global_site_group.pk]}) self.assertIsNone(form.limited_to_local_site) self.assertIn('local_site', form.fields) self.assertEqual(list(form.fields['users'].queryset), [local_site_user, global_site_user]) self.assertEqual(list(form.fields['review_groups'].queryset), [local_site_group, global_site_group]) self.assertIsNone(form.fields['users'].widget.local_site_name) self.assertEqual(list(form.fields['hosting_account'].queryset), [local_site_account, global_site_account]) self.assertTrue(form.is_valid()) self.assertEqual(list(form.fields['users'].queryset), [local_site_user, global_site_user]) self.assertEqual(list(form.fields['review_groups'].queryset), [local_site_group, global_site_group]) self.assertEqual(list(form.fields['hosting_account'].queryset), [local_site_account, global_site_account]) repository = form.save() form.save_m2m() self.assertIsNone(repository.local_site) self.assertEqual(list(repository.users.all()), [global_site_user]) self.assertEqual(list(repository.review_groups.all()), [global_site_group])<|docstring|>Testing RepositoryForm without a LocalSite<|endoftext|>
f785ab6c4b57b7c50d068a02969b254e20b616287c0b6bf689d3516901071e82
def test_without_localsite_and_instance(self): 'Testing RepositoryForm without a LocalSite and editing instance' local_site = LocalSite.objects.create(name='test') repository = self.create_repository(local_site=local_site) form = RepositoryForm(data={'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none'}, instance=repository) self.assertTrue(form.is_valid()) new_repository = form.save() self.assertEqual(repository.pk, new_repository.pk) self.assertIsNone(new_repository.local_site)
Testing RepositoryForm without a LocalSite and editing instance
reviewboard/scmtools/tests/test_repository_form.py
test_without_localsite_and_instance
amalik2/reviewboard
2
python
def test_without_localsite_and_instance(self): local_site = LocalSite.objects.create(name='test') repository = self.create_repository(local_site=local_site) form = RepositoryForm(data={'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none'}, instance=repository) self.assertTrue(form.is_valid()) new_repository = form.save() self.assertEqual(repository.pk, new_repository.pk) self.assertIsNone(new_repository.local_site)
def test_without_localsite_and_instance(self): local_site = LocalSite.objects.create(name='test') repository = self.create_repository(local_site=local_site) form = RepositoryForm(data={'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none'}, instance=repository) self.assertTrue(form.is_valid()) new_repository = form.save() self.assertEqual(repository.pk, new_repository.pk) self.assertIsNone(new_repository.local_site)<|docstring|>Testing RepositoryForm without a LocalSite and editing instance<|endoftext|>
42467f5421b4fa3b094c5eb9b2d3597cd9016d0289527325e62ef8a26db8a7c3
def test_without_localsite_and_with_local_site_user(self): 'Testing RepositoryForm without a LocalSite and User on a LocalSite\n ' local_site = LocalSite.objects.create(name='test') user = User.objects.create_user(username='testuser1') local_site.users.add(user) form = RepositoryForm(data={'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none', 'users': [user.pk]}) self.assertTrue(form.is_valid())
Testing RepositoryForm without a LocalSite and User on a LocalSite
reviewboard/scmtools/tests/test_repository_form.py
test_without_localsite_and_with_local_site_user
amalik2/reviewboard
2
python
def test_without_localsite_and_with_local_site_user(self): '\n ' local_site = LocalSite.objects.create(name='test') user = User.objects.create_user(username='testuser1') local_site.users.add(user) form = RepositoryForm(data={'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none', 'users': [user.pk]}) self.assertTrue(form.is_valid())
def test_without_localsite_and_with_local_site_user(self): '\n ' local_site = LocalSite.objects.create(name='test') user = User.objects.create_user(username='testuser1') local_site.users.add(user) form = RepositoryForm(data={'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none', 'users': [user.pk]}) self.assertTrue(form.is_valid())<|docstring|>Testing RepositoryForm without a LocalSite and User on a LocalSite<|endoftext|>
a67d51dd1ba28914a4cf358cff7f13ce21c7bd5f2aba9a218dd43a1a01e7cfdc
def test_without_localsite_and_with_local_site_group(self): 'Testing RepositoryForm without a LocalSite and Group on a LocalSite\n ' local_site = LocalSite.objects.create(name='test') group = self.create_review_group(local_site=local_site) form = RepositoryForm(data={'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none', 'review_groups': [group.pk]}) self.assertFalse(form.is_valid()) self.assertEqual(form.errors, {'review_groups': ['Select a valid choice. 1 is not one of the available choices.']})
Testing RepositoryForm without a LocalSite and Group on a LocalSite
reviewboard/scmtools/tests/test_repository_form.py
test_without_localsite_and_with_local_site_group
amalik2/reviewboard
2
python
def test_without_localsite_and_with_local_site_group(self): '\n ' local_site = LocalSite.objects.create(name='test') group = self.create_review_group(local_site=local_site) form = RepositoryForm(data={'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none', 'review_groups': [group.pk]}) self.assertFalse(form.is_valid()) self.assertEqual(form.errors, {'review_groups': ['Select a valid choice. 1 is not one of the available choices.']})
def test_without_localsite_and_with_local_site_group(self): '\n ' local_site = LocalSite.objects.create(name='test') group = self.create_review_group(local_site=local_site) form = RepositoryForm(data={'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none', 'review_groups': [group.pk]}) self.assertFalse(form.is_valid()) self.assertEqual(form.errors, {'review_groups': ['Select a valid choice. 1 is not one of the available choices.']})<|docstring|>Testing RepositoryForm without a LocalSite and Group on a LocalSite<|endoftext|>
0311dc89ab8bfd63265e9cb7109345510f36760a3f175e82a02c368b24d8ead5
def test_without_localsite_and_with_local_site_hosting_account(self): 'Testing RepositoryForm without a LocalSite and\n HostingServiceAccount on a LocalSite\n ' local_site = LocalSite.objects.create(name='test') hosting_account = HostingServiceAccount.objects.create(username='test-user', service_name='test', local_site=local_site) form = RepositoryForm(data={'name': 'test', 'hosting_type': 'test', 'hosting_account': hosting_account.pk, 'test_repo_name': 'test', 'tool': self.git_tool_id, 'bug_tracker_type': 'none'}) self.assertFalse(form.is_valid()) self.assertEqual(form.errors, {'hosting_account': ['Select a valid choice. That choice is not one of the available choices.']})
Testing RepositoryForm without a LocalSite and HostingServiceAccount on a LocalSite
reviewboard/scmtools/tests/test_repository_form.py
test_without_localsite_and_with_local_site_hosting_account
amalik2/reviewboard
2
python
def test_without_localsite_and_with_local_site_hosting_account(self): 'Testing RepositoryForm without a LocalSite and\n HostingServiceAccount on a LocalSite\n ' local_site = LocalSite.objects.create(name='test') hosting_account = HostingServiceAccount.objects.create(username='test-user', service_name='test', local_site=local_site) form = RepositoryForm(data={'name': 'test', 'hosting_type': 'test', 'hosting_account': hosting_account.pk, 'test_repo_name': 'test', 'tool': self.git_tool_id, 'bug_tracker_type': 'none'}) self.assertFalse(form.is_valid()) self.assertEqual(form.errors, {'hosting_account': ['Select a valid choice. That choice is not one of the available choices.']})
def test_without_localsite_and_with_local_site_hosting_account(self): 'Testing RepositoryForm without a LocalSite and\n HostingServiceAccount on a LocalSite\n ' local_site = LocalSite.objects.create(name='test') hosting_account = HostingServiceAccount.objects.create(username='test-user', service_name='test', local_site=local_site) form = RepositoryForm(data={'name': 'test', 'hosting_type': 'test', 'hosting_account': hosting_account.pk, 'test_repo_name': 'test', 'tool': self.git_tool_id, 'bug_tracker_type': 'none'}) self.assertFalse(form.is_valid()) self.assertEqual(form.errors, {'hosting_account': ['Select a valid choice. That choice is not one of the available choices.']})<|docstring|>Testing RepositoryForm without a LocalSite and HostingServiceAccount on a LocalSite<|endoftext|>
5c29d1a129b96a12668b2182316364d149ddce28f6ce7dbd955c000106a54a14
def test_with_limited_localsite(self): 'Testing RepositoryForm limited to a LocalSite' local_site = LocalSite.objects.create(name='test') local_site_user = User.objects.create_user(username='testuser1') local_site.users.add(local_site_user) User.objects.create_user(username='testuser2') local_site_group = self.create_review_group(name='test1', invite_only=True, local_site=local_site) self.create_review_group(name='test2', invite_only=True) form = RepositoryForm(limit_to_local_site=local_site) self.assertEqual(form.limited_to_local_site, local_site) self.assertNotIn('local_site', form.fields) self.assertEqual(list(form.fields['users'].queryset), [local_site_user]) self.assertEqual(list(form.fields['review_groups'].queryset), [local_site_group]) self.assertEqual(form.fields['users'].widget.local_site_name, local_site.name)
Testing RepositoryForm limited to a LocalSite
reviewboard/scmtools/tests/test_repository_form.py
test_with_limited_localsite
amalik2/reviewboard
2
python
def test_with_limited_localsite(self): local_site = LocalSite.objects.create(name='test') local_site_user = User.objects.create_user(username='testuser1') local_site.users.add(local_site_user) User.objects.create_user(username='testuser2') local_site_group = self.create_review_group(name='test1', invite_only=True, local_site=local_site) self.create_review_group(name='test2', invite_only=True) form = RepositoryForm(limit_to_local_site=local_site) self.assertEqual(form.limited_to_local_site, local_site) self.assertNotIn('local_site', form.fields) self.assertEqual(list(form.fields['users'].queryset), [local_site_user]) self.assertEqual(list(form.fields['review_groups'].queryset), [local_site_group]) self.assertEqual(form.fields['users'].widget.local_site_name, local_site.name)
def test_with_limited_localsite(self): local_site = LocalSite.objects.create(name='test') local_site_user = User.objects.create_user(username='testuser1') local_site.users.add(local_site_user) User.objects.create_user(username='testuser2') local_site_group = self.create_review_group(name='test1', invite_only=True, local_site=local_site) self.create_review_group(name='test2', invite_only=True) form = RepositoryForm(limit_to_local_site=local_site) self.assertEqual(form.limited_to_local_site, local_site) self.assertNotIn('local_site', form.fields) self.assertEqual(list(form.fields['users'].queryset), [local_site_user]) self.assertEqual(list(form.fields['review_groups'].queryset), [local_site_group]) self.assertEqual(form.fields['users'].widget.local_site_name, local_site.name)<|docstring|>Testing RepositoryForm limited to a LocalSite<|endoftext|>
12a1d870dad705c288f990c543f034f966d58e079d07bca1014c3c1c5c2273a4
def test_with_limited_localsite_and_changing_site(self): 'Testing RepositoryForm limited to a LocalSite and changing\n LocalSite\n ' local_site1 = LocalSite.objects.create(name='test-site-1') local_site2 = LocalSite.objects.create(name='test-site-2') form = RepositoryForm(data={'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none', 'local_site': local_site2.pk}, limit_to_local_site=local_site1) self.assertEqual(form.limited_to_local_site, local_site1) self.assertTrue(form.is_valid()) self.assertEqual(form.cleaned_data['local_site'], local_site1) repository = form.save() self.assertEqual(repository.local_site, local_site1)
Testing RepositoryForm limited to a LocalSite and changing LocalSite
reviewboard/scmtools/tests/test_repository_form.py
test_with_limited_localsite_and_changing_site
amalik2/reviewboard
2
python
def test_with_limited_localsite_and_changing_site(self): 'Testing RepositoryForm limited to a LocalSite and changing\n LocalSite\n ' local_site1 = LocalSite.objects.create(name='test-site-1') local_site2 = LocalSite.objects.create(name='test-site-2') form = RepositoryForm(data={'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none', 'local_site': local_site2.pk}, limit_to_local_site=local_site1) self.assertEqual(form.limited_to_local_site, local_site1) self.assertTrue(form.is_valid()) self.assertEqual(form.cleaned_data['local_site'], local_site1) repository = form.save() self.assertEqual(repository.local_site, local_site1)
def test_with_limited_localsite_and_changing_site(self): 'Testing RepositoryForm limited to a LocalSite and changing\n LocalSite\n ' local_site1 = LocalSite.objects.create(name='test-site-1') local_site2 = LocalSite.objects.create(name='test-site-2') form = RepositoryForm(data={'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none', 'local_site': local_site2.pk}, limit_to_local_site=local_site1) self.assertEqual(form.limited_to_local_site, local_site1) self.assertTrue(form.is_valid()) self.assertEqual(form.cleaned_data['local_site'], local_site1) repository = form.save() self.assertEqual(repository.local_site, local_site1)<|docstring|>Testing RepositoryForm limited to a LocalSite and changing LocalSite<|endoftext|>
31a7b4932fcc9fa9e859c877951f7ba4bd06d9cd9a021a43ce6c81dc2745c69d
def test_with_limited_localsite_and_compatible_instance(self): 'Testing RepositoryForm limited to a LocalSite and editing compatible\n instance\n ' local_site = LocalSite.objects.create(name='test') repository = self.create_repository(local_site=local_site) RepositoryForm(instance=repository, limit_to_local_site=local_site)
Testing RepositoryForm limited to a LocalSite and editing compatible instance
reviewboard/scmtools/tests/test_repository_form.py
test_with_limited_localsite_and_compatible_instance
amalik2/reviewboard
2
python
def test_with_limited_localsite_and_compatible_instance(self): 'Testing RepositoryForm limited to a LocalSite and editing compatible\n instance\n ' local_site = LocalSite.objects.create(name='test') repository = self.create_repository(local_site=local_site) RepositoryForm(instance=repository, limit_to_local_site=local_site)
def test_with_limited_localsite_and_compatible_instance(self): 'Testing RepositoryForm limited to a LocalSite and editing compatible\n instance\n ' local_site = LocalSite.objects.create(name='test') repository = self.create_repository(local_site=local_site) RepositoryForm(instance=repository, limit_to_local_site=local_site)<|docstring|>Testing RepositoryForm limited to a LocalSite and editing compatible instance<|endoftext|>
c22ac9c6ea0d251156b4373cc57a999e6b5eb4dcd26802181d107265ee9d386b
def test_with_limited_localsite_and_incompatible_instance(self): 'Testing RepositoryForm limited to a LocalSite and editing\n incompatible instance\n ' local_site = LocalSite.objects.create(name='test') repository = self.create_repository() error_message = 'The provided instance is not associated with a LocalSite compatible with this form. Please contact support.' with self.assertRaisesMessage(ValueError, error_message): RepositoryForm(instance=repository, limit_to_local_site=local_site)
Testing RepositoryForm limited to a LocalSite and editing incompatible instance
reviewboard/scmtools/tests/test_repository_form.py
test_with_limited_localsite_and_incompatible_instance
amalik2/reviewboard
2
python
def test_with_limited_localsite_and_incompatible_instance(self): 'Testing RepositoryForm limited to a LocalSite and editing\n incompatible instance\n ' local_site = LocalSite.objects.create(name='test') repository = self.create_repository() error_message = 'The provided instance is not associated with a LocalSite compatible with this form. Please contact support.' with self.assertRaisesMessage(ValueError, error_message): RepositoryForm(instance=repository, limit_to_local_site=local_site)
def test_with_limited_localsite_and_incompatible_instance(self): 'Testing RepositoryForm limited to a LocalSite and editing\n incompatible instance\n ' local_site = LocalSite.objects.create(name='test') repository = self.create_repository() error_message = 'The provided instance is not associated with a LocalSite compatible with this form. Please contact support.' with self.assertRaisesMessage(ValueError, error_message): RepositoryForm(instance=repository, limit_to_local_site=local_site)<|docstring|>Testing RepositoryForm limited to a LocalSite and editing incompatible instance<|endoftext|>
f69db7b85dafc096525065fc7087ec48e3b6c664438c0e5353d59f21336513c2
def test_with_limited_localsite_and_invalid_user(self): 'Testing DefaultReviewerForm limited to a LocalSite with a User\n not on the LocalSite\n ' local_site = LocalSite.objects.create(name='test') user = User.objects.create_user(username='test') form = RepositoryForm(data={'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none', 'users': [user.pk]}, limit_to_local_site=local_site) self.assertFalse(form.is_valid()) self.assertEqual(form.errors, {'users': ['Select a valid choice. 1 is not one of the available choices.']})
Testing DefaultReviewerForm limited to a LocalSite with a User not on the LocalSite
reviewboard/scmtools/tests/test_repository_form.py
test_with_limited_localsite_and_invalid_user
amalik2/reviewboard
2
python
def test_with_limited_localsite_and_invalid_user(self): 'Testing DefaultReviewerForm limited to a LocalSite with a User\n not on the LocalSite\n ' local_site = LocalSite.objects.create(name='test') user = User.objects.create_user(username='test') form = RepositoryForm(data={'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none', 'users': [user.pk]}, limit_to_local_site=local_site) self.assertFalse(form.is_valid()) self.assertEqual(form.errors, {'users': ['Select a valid choice. 1 is not one of the available choices.']})
def test_with_limited_localsite_and_invalid_user(self): 'Testing DefaultReviewerForm limited to a LocalSite with a User\n not on the LocalSite\n ' local_site = LocalSite.objects.create(name='test') user = User.objects.create_user(username='test') form = RepositoryForm(data={'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none', 'users': [user.pk]}, limit_to_local_site=local_site) self.assertFalse(form.is_valid()) self.assertEqual(form.errors, {'users': ['Select a valid choice. 1 is not one of the available choices.']})<|docstring|>Testing DefaultReviewerForm limited to a LocalSite with a User not on the LocalSite<|endoftext|>
f87ab63538bc49bfebfd109e09462c1f2ecc5f0f12a52b1e8d3a724e238005e5
def test_with_limited_localsite_and_invalid_group(self): 'Testing DefaultReviewerForm limited to a LocalSite with a Group\n not on the LocalSite\n ' local_site = LocalSite.objects.create(name='test') group = self.create_review_group() form = RepositoryForm(data={'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none', 'review_groups': [group.pk]}, limit_to_local_site=local_site) self.assertFalse(form.is_valid()) self.assertEqual(form.errors, {'review_groups': ['Select a valid choice. 1 is not one of the available choices.']})
Testing DefaultReviewerForm limited to a LocalSite with a Group not on the LocalSite
reviewboard/scmtools/tests/test_repository_form.py
test_with_limited_localsite_and_invalid_group
amalik2/reviewboard
2
python
def test_with_limited_localsite_and_invalid_group(self): 'Testing DefaultReviewerForm limited to a LocalSite with a Group\n not on the LocalSite\n ' local_site = LocalSite.objects.create(name='test') group = self.create_review_group() form = RepositoryForm(data={'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none', 'review_groups': [group.pk]}, limit_to_local_site=local_site) self.assertFalse(form.is_valid()) self.assertEqual(form.errors, {'review_groups': ['Select a valid choice. 1 is not one of the available choices.']})
def test_with_limited_localsite_and_invalid_group(self): 'Testing DefaultReviewerForm limited to a LocalSite with a Group\n not on the LocalSite\n ' local_site = LocalSite.objects.create(name='test') group = self.create_review_group() form = RepositoryForm(data={'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none', 'review_groups': [group.pk]}, limit_to_local_site=local_site) self.assertFalse(form.is_valid()) self.assertEqual(form.errors, {'review_groups': ['Select a valid choice. 1 is not one of the available choices.']})<|docstring|>Testing DefaultReviewerForm limited to a LocalSite with a Group not on the LocalSite<|endoftext|>
c4ae811e66d6f23d7b8b97f75544ed35b124fd328f1eaa295616b4eb6e8417f0
def test_with_limited_localsite_and_invalid_hosting_account(self): 'Testing DefaultReviewerForm limited to a LocalSite with a\n HostingServiceAccount not on the LocalSite\n ' local_site = LocalSite.objects.create(name='test') hosting_account = HostingServiceAccount.objects.create(username='test-user', service_name='test') form = RepositoryForm(data={'name': 'test', 'hosting_type': 'test', 'hosting_account': hosting_account.pk, 'test_repo_name': 'test', 'tool': self.git_tool_id, 'bug_tracker_type': 'none'}, limit_to_local_site=local_site) self.assertFalse(form.is_valid()) self.assertEqual(form.errors, {'hosting_account': ['Select a valid choice. That choice is not one of the available choices.']})
Testing DefaultReviewerForm limited to a LocalSite with a HostingServiceAccount not on the LocalSite
reviewboard/scmtools/tests/test_repository_form.py
test_with_limited_localsite_and_invalid_hosting_account
amalik2/reviewboard
2
python
def test_with_limited_localsite_and_invalid_hosting_account(self): 'Testing DefaultReviewerForm limited to a LocalSite with a\n HostingServiceAccount not on the LocalSite\n ' local_site = LocalSite.objects.create(name='test') hosting_account = HostingServiceAccount.objects.create(username='test-user', service_name='test') form = RepositoryForm(data={'name': 'test', 'hosting_type': 'test', 'hosting_account': hosting_account.pk, 'test_repo_name': 'test', 'tool': self.git_tool_id, 'bug_tracker_type': 'none'}, limit_to_local_site=local_site) self.assertFalse(form.is_valid()) self.assertEqual(form.errors, {'hosting_account': ['Select a valid choice. That choice is not one of the available choices.']})
def test_with_limited_localsite_and_invalid_hosting_account(self): 'Testing DefaultReviewerForm limited to a LocalSite with a\n HostingServiceAccount not on the LocalSite\n ' local_site = LocalSite.objects.create(name='test') hosting_account = HostingServiceAccount.objects.create(username='test-user', service_name='test') form = RepositoryForm(data={'name': 'test', 'hosting_type': 'test', 'hosting_account': hosting_account.pk, 'test_repo_name': 'test', 'tool': self.git_tool_id, 'bug_tracker_type': 'none'}, limit_to_local_site=local_site) self.assertFalse(form.is_valid()) self.assertEqual(form.errors, {'hosting_account': ['Select a valid choice. That choice is not one of the available choices.']})<|docstring|>Testing DefaultReviewerForm limited to a LocalSite with a HostingServiceAccount not on the LocalSite<|endoftext|>
24dd1865da5322d65f0c64122a5ba6f6d29b11aeca322283b1c1dfa64d606bea
def test_with_localsite_in_data(self): 'Testing RepositoryForm with a LocalSite in form data' local_site = LocalSite.objects.create(name='test') local_site_user = User.objects.create_user(username='testuser1') local_site.users.add(local_site_user) global_site_user = User.objects.create_user(username='testuser2') local_site_group = self.create_review_group(name='test1', invite_only=True, local_site=local_site) global_site_group = self.create_review_group(name='test2', invite_only=True) local_site_account = HostingServiceAccount.objects.create(username='local-test-user', service_name='test', local_site=local_site) local_site_account.data['password'] = 'testpass' local_site_account.save(update_fields=('data',)) global_site_account = HostingServiceAccount.objects.create(username='global-test-user', service_name='test') form = RepositoryForm() self.assertIsNone(form.limited_to_local_site) self.assertIn('local_site', form.fields) self.assertEqual(list(form.fields['users'].queryset), [local_site_user, global_site_user]) self.assertEqual(list(form.fields['review_groups'].queryset), [local_site_group, global_site_group]) self.assertIsNone(form.fields['users'].widget.local_site_name) self.assertEqual(list(form.fields['hosting_account'].queryset), [local_site_account, global_site_account]) form = RepositoryForm(data={'name': 'test', 'hosting_type': 'test', 'hosting_account': local_site_account.pk, 'test_repo_name': 'test', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none', 'local_site': local_site.pk, 'users': [local_site_user.pk], 'review_groups': [local_site_group.pk]}) self.assertIsNone(form.limited_to_local_site) self.assertIn('local_site', form.fields) self.assertEqual(list(form.fields['users'].queryset), [local_site_user, global_site_user]) self.assertEqual(list(form.fields['review_groups'].queryset), [local_site_group, global_site_group]) self.assertIsNone(form.fields['users'].widget.local_site_name) self.assertEqual(list(form.fields['hosting_account'].queryset), [local_site_account, global_site_account]) self.assertTrue(form.is_valid()) self.assertEqual(list(form.fields['users'].queryset), [local_site_user, global_site_user]) self.assertEqual(list(form.fields['review_groups'].queryset), [local_site_group, global_site_group]) self.assertEqual(list(form.fields['hosting_account'].queryset), [local_site_account, global_site_account]) repository = form.save() form.save_m2m() self.assertEqual(repository.local_site, local_site) self.assertEqual(repository.hosting_account, local_site_account) self.assertEqual(list(repository.users.all()), [local_site_user]) self.assertEqual(list(repository.review_groups.all()), [local_site_group])
Testing RepositoryForm with a LocalSite in form data
reviewboard/scmtools/tests/test_repository_form.py
test_with_localsite_in_data
amalik2/reviewboard
2
python
def test_with_localsite_in_data(self): local_site = LocalSite.objects.create(name='test') local_site_user = User.objects.create_user(username='testuser1') local_site.users.add(local_site_user) global_site_user = User.objects.create_user(username='testuser2') local_site_group = self.create_review_group(name='test1', invite_only=True, local_site=local_site) global_site_group = self.create_review_group(name='test2', invite_only=True) local_site_account = HostingServiceAccount.objects.create(username='local-test-user', service_name='test', local_site=local_site) local_site_account.data['password'] = 'testpass' local_site_account.save(update_fields=('data',)) global_site_account = HostingServiceAccount.objects.create(username='global-test-user', service_name='test') form = RepositoryForm() self.assertIsNone(form.limited_to_local_site) self.assertIn('local_site', form.fields) self.assertEqual(list(form.fields['users'].queryset), [local_site_user, global_site_user]) self.assertEqual(list(form.fields['review_groups'].queryset), [local_site_group, global_site_group]) self.assertIsNone(form.fields['users'].widget.local_site_name) self.assertEqual(list(form.fields['hosting_account'].queryset), [local_site_account, global_site_account]) form = RepositoryForm(data={'name': 'test', 'hosting_type': 'test', 'hosting_account': local_site_account.pk, 'test_repo_name': 'test', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none', 'local_site': local_site.pk, 'users': [local_site_user.pk], 'review_groups': [local_site_group.pk]}) self.assertIsNone(form.limited_to_local_site) self.assertIn('local_site', form.fields) self.assertEqual(list(form.fields['users'].queryset), [local_site_user, global_site_user]) self.assertEqual(list(form.fields['review_groups'].queryset), [local_site_group, global_site_group]) self.assertIsNone(form.fields['users'].widget.local_site_name) self.assertEqual(list(form.fields['hosting_account'].queryset), [local_site_account, global_site_account]) self.assertTrue(form.is_valid()) self.assertEqual(list(form.fields['users'].queryset), [local_site_user, global_site_user]) self.assertEqual(list(form.fields['review_groups'].queryset), [local_site_group, global_site_group]) self.assertEqual(list(form.fields['hosting_account'].queryset), [local_site_account, global_site_account]) repository = form.save() form.save_m2m() self.assertEqual(repository.local_site, local_site) self.assertEqual(repository.hosting_account, local_site_account) self.assertEqual(list(repository.users.all()), [local_site_user]) self.assertEqual(list(repository.review_groups.all()), [local_site_group])
def test_with_localsite_in_data(self): local_site = LocalSite.objects.create(name='test') local_site_user = User.objects.create_user(username='testuser1') local_site.users.add(local_site_user) global_site_user = User.objects.create_user(username='testuser2') local_site_group = self.create_review_group(name='test1', invite_only=True, local_site=local_site) global_site_group = self.create_review_group(name='test2', invite_only=True) local_site_account = HostingServiceAccount.objects.create(username='local-test-user', service_name='test', local_site=local_site) local_site_account.data['password'] = 'testpass' local_site_account.save(update_fields=('data',)) global_site_account = HostingServiceAccount.objects.create(username='global-test-user', service_name='test') form = RepositoryForm() self.assertIsNone(form.limited_to_local_site) self.assertIn('local_site', form.fields) self.assertEqual(list(form.fields['users'].queryset), [local_site_user, global_site_user]) self.assertEqual(list(form.fields['review_groups'].queryset), [local_site_group, global_site_group]) self.assertIsNone(form.fields['users'].widget.local_site_name) self.assertEqual(list(form.fields['hosting_account'].queryset), [local_site_account, global_site_account]) form = RepositoryForm(data={'name': 'test', 'hosting_type': 'test', 'hosting_account': local_site_account.pk, 'test_repo_name': 'test', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none', 'local_site': local_site.pk, 'users': [local_site_user.pk], 'review_groups': [local_site_group.pk]}) self.assertIsNone(form.limited_to_local_site) self.assertIn('local_site', form.fields) self.assertEqual(list(form.fields['users'].queryset), [local_site_user, global_site_user]) self.assertEqual(list(form.fields['review_groups'].queryset), [local_site_group, global_site_group]) self.assertIsNone(form.fields['users'].widget.local_site_name) self.assertEqual(list(form.fields['hosting_account'].queryset), [local_site_account, global_site_account]) self.assertTrue(form.is_valid()) self.assertEqual(list(form.fields['users'].queryset), [local_site_user, global_site_user]) self.assertEqual(list(form.fields['review_groups'].queryset), [local_site_group, global_site_group]) self.assertEqual(list(form.fields['hosting_account'].queryset), [local_site_account, global_site_account]) repository = form.save() form.save_m2m() self.assertEqual(repository.local_site, local_site) self.assertEqual(repository.hosting_account, local_site_account) self.assertEqual(list(repository.users.all()), [local_site_user]) self.assertEqual(list(repository.review_groups.all()), [local_site_group])<|docstring|>Testing RepositoryForm with a LocalSite in form data<|endoftext|>
3c03176bb7c0dc9417e5f861e9bdb551f7006737dc74e6dff1645b9359a5b02f
def test_with_localsite_in_data_and_instance(self): 'Testing RepositoryForm with a LocalSite in form data and editing\n instance\n ' local_site = LocalSite.objects.create(name='test') repository = self.create_repository() form = RepositoryForm(data={'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none', 'local_site': local_site.pk}, instance=repository) self.assertTrue(form.is_valid()) new_repository = form.save() self.assertEqual(repository.pk, new_repository.pk) self.assertEqual(new_repository.local_site, local_site)
Testing RepositoryForm with a LocalSite in form data and editing instance
reviewboard/scmtools/tests/test_repository_form.py
test_with_localsite_in_data_and_instance
amalik2/reviewboard
2
python
def test_with_localsite_in_data_and_instance(self): 'Testing RepositoryForm with a LocalSite in form data and editing\n instance\n ' local_site = LocalSite.objects.create(name='test') repository = self.create_repository() form = RepositoryForm(data={'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none', 'local_site': local_site.pk}, instance=repository) self.assertTrue(form.is_valid()) new_repository = form.save() self.assertEqual(repository.pk, new_repository.pk) self.assertEqual(new_repository.local_site, local_site)
def test_with_localsite_in_data_and_instance(self): 'Testing RepositoryForm with a LocalSite in form data and editing\n instance\n ' local_site = LocalSite.objects.create(name='test') repository = self.create_repository() form = RepositoryForm(data={'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none', 'local_site': local_site.pk}, instance=repository) self.assertTrue(form.is_valid()) new_repository = form.save() self.assertEqual(repository.pk, new_repository.pk) self.assertEqual(new_repository.local_site, local_site)<|docstring|>Testing RepositoryForm with a LocalSite in form data and editing instance<|endoftext|>
014672ff9f49fbb022e7a8f8b13fbcbf11a989a2c6bb5cf18404249aac946e6c
def test_with_localsite_in_data_and_invalid_user(self): 'Testing RepositoryForm with a LocalSite in form data and User not\n on the LocalSite\n ' local_site = LocalSite.objects.create(name='test') user = User.objects.create_user(username='test-user') form = RepositoryForm(data={'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none', 'local_site': local_site.pk, 'users': [user.pk]}) self.assertFalse(form.is_valid()) self.assertEqual(form.errors, {'users': ['Select a valid choice. 1 is not one of the available choices.']})
Testing RepositoryForm with a LocalSite in form data and User not on the LocalSite
reviewboard/scmtools/tests/test_repository_form.py
test_with_localsite_in_data_and_invalid_user
amalik2/reviewboard
2
python
def test_with_localsite_in_data_and_invalid_user(self): 'Testing RepositoryForm with a LocalSite in form data and User not\n on the LocalSite\n ' local_site = LocalSite.objects.create(name='test') user = User.objects.create_user(username='test-user') form = RepositoryForm(data={'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none', 'local_site': local_site.pk, 'users': [user.pk]}) self.assertFalse(form.is_valid()) self.assertEqual(form.errors, {'users': ['Select a valid choice. 1 is not one of the available choices.']})
def test_with_localsite_in_data_and_invalid_user(self): 'Testing RepositoryForm with a LocalSite in form data and User not\n on the LocalSite\n ' local_site = LocalSite.objects.create(name='test') user = User.objects.create_user(username='test-user') form = RepositoryForm(data={'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none', 'local_site': local_site.pk, 'users': [user.pk]}) self.assertFalse(form.is_valid()) self.assertEqual(form.errors, {'users': ['Select a valid choice. 1 is not one of the available choices.']})<|docstring|>Testing RepositoryForm with a LocalSite in form data and User not on the LocalSite<|endoftext|>
5c41142ecb72e693de2276f205da8e6e29873efc65168f64140441bda49462e2
def test_with_localsite_in_data_and_invalid_group(self): 'Testing RepositoryForm with a LocalSite in form data and Group not\n on the LocalSite\n ' local_site = LocalSite.objects.create(name='test') group = self.create_review_group() form = RepositoryForm(data={'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none', 'local_site': local_site.pk, 'review_groups': [group.pk]}) self.assertFalse(form.is_valid()) self.assertEqual(form.errors, {'review_groups': ['Select a valid choice. 1 is not one of the available choices.']})
Testing RepositoryForm with a LocalSite in form data and Group not on the LocalSite
reviewboard/scmtools/tests/test_repository_form.py
test_with_localsite_in_data_and_invalid_group
amalik2/reviewboard
2
python
def test_with_localsite_in_data_and_invalid_group(self): 'Testing RepositoryForm with a LocalSite in form data and Group not\n on the LocalSite\n ' local_site = LocalSite.objects.create(name='test') group = self.create_review_group() form = RepositoryForm(data={'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none', 'local_site': local_site.pk, 'review_groups': [group.pk]}) self.assertFalse(form.is_valid()) self.assertEqual(form.errors, {'review_groups': ['Select a valid choice. 1 is not one of the available choices.']})
def test_with_localsite_in_data_and_invalid_group(self): 'Testing RepositoryForm with a LocalSite in form data and Group not\n on the LocalSite\n ' local_site = LocalSite.objects.create(name='test') group = self.create_review_group() form = RepositoryForm(data={'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none', 'local_site': local_site.pk, 'review_groups': [group.pk]}) self.assertFalse(form.is_valid()) self.assertEqual(form.errors, {'review_groups': ['Select a valid choice. 1 is not one of the available choices.']})<|docstring|>Testing RepositoryForm with a LocalSite in form data and Group not on the LocalSite<|endoftext|>
95379c721c7be83935eadd90a35aafd4152b8f56490d88ae03976aaa76c2d185
def test_plain_repository(self): 'Testing RepositoryForm with a plain repository' form = RepositoryForm({'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none'}) self.assertTrue(form.is_valid()) repository = form.save() self.assertEqual(repository.name, 'test') self.assertEqual(repository.hosting_account, None) self.assertEqual(repository.extra_data, {}) for auth_form in six.itervalues(form.hosting_auth_forms): self.assertEqual(auth_form.errors, {})
Testing RepositoryForm with a plain repository
reviewboard/scmtools/tests/test_repository_form.py
test_plain_repository
amalik2/reviewboard
2
python
def test_plain_repository(self): form = RepositoryForm({'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none'}) self.assertTrue(form.is_valid()) repository = form.save() self.assertEqual(repository.name, 'test') self.assertEqual(repository.hosting_account, None) self.assertEqual(repository.extra_data, {}) for auth_form in six.itervalues(form.hosting_auth_forms): self.assertEqual(auth_form.errors, {})
def test_plain_repository(self): form = RepositoryForm({'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none'}) self.assertTrue(form.is_valid()) repository = form.save() self.assertEqual(repository.name, 'test') self.assertEqual(repository.hosting_account, None) self.assertEqual(repository.extra_data, {}) for auth_form in six.itervalues(form.hosting_auth_forms): self.assertEqual(auth_form.errors, {})<|docstring|>Testing RepositoryForm with a plain repository<|endoftext|>
51f8c57d00c40d0906a0abf3f375d7632a76289be23026d3bbcef2bccb35a9e9
def test_plain_repository_with_missing_fields(self): 'Testing RepositoryForm with a plain repository with missing fields\n ' form = RepositoryForm({'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'bug_tracker_type': 'none'}) self.assertFalse(form.is_valid()) self.assertIn('path', form.errors) for auth_form in six.itervalues(form.hosting_auth_forms): self.assertEqual(auth_form.errors, {})
Testing RepositoryForm with a plain repository with missing fields
reviewboard/scmtools/tests/test_repository_form.py
test_plain_repository_with_missing_fields
amalik2/reviewboard
2
python
def test_plain_repository_with_missing_fields(self): '\n ' form = RepositoryForm({'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'bug_tracker_type': 'none'}) self.assertFalse(form.is_valid()) self.assertIn('path', form.errors) for auth_form in six.itervalues(form.hosting_auth_forms): self.assertEqual(auth_form.errors, {})
def test_plain_repository_with_missing_fields(self): '\n ' form = RepositoryForm({'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'bug_tracker_type': 'none'}) self.assertFalse(form.is_valid()) self.assertIn('path', form.errors) for auth_form in six.itervalues(form.hosting_auth_forms): self.assertEqual(auth_form.errors, {})<|docstring|>Testing RepositoryForm with a plain repository with missing fields<|endoftext|>
fa4fa9e2014d4178950cedcd44d736d0a138e54416995a442a1cfb9076760551
def test_with_hosting_service_new_account(self): 'Testing RepositoryForm with a hosting service and new account' form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'test-hosting_account_username': 'testuser', 'test-hosting_account_password': 'testpass', 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'none'}) self.assertTrue(form.is_valid()) self.assertTrue(form.hosting_account_linked) repository = form.save() self.assertEqual(repository.name, 'test') self.assertEqual(repository.hosting_account.username, 'testuser') self.assertEqual(repository.hosting_account.service_name, 'test') self.assertEqual(repository.hosting_account.local_site, None) self.assertEqual(repository.extra_data['repository_plan'], '') self.assertEqual(repository.path, 'http://example.com/testrepo/') self.assertEqual(repository.mirror_path, '') for auth_form in six.itervalues(form.hosting_auth_forms): self.assertEqual(auth_form.errors, {})
Testing RepositoryForm with a hosting service and new account
reviewboard/scmtools/tests/test_repository_form.py
test_with_hosting_service_new_account
amalik2/reviewboard
2
python
def test_with_hosting_service_new_account(self): form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'test-hosting_account_username': 'testuser', 'test-hosting_account_password': 'testpass', 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'none'}) self.assertTrue(form.is_valid()) self.assertTrue(form.hosting_account_linked) repository = form.save() self.assertEqual(repository.name, 'test') self.assertEqual(repository.hosting_account.username, 'testuser') self.assertEqual(repository.hosting_account.service_name, 'test') self.assertEqual(repository.hosting_account.local_site, None) self.assertEqual(repository.extra_data['repository_plan'], ) self.assertEqual(repository.path, 'http://example.com/testrepo/') self.assertEqual(repository.mirror_path, ) for auth_form in six.itervalues(form.hosting_auth_forms): self.assertEqual(auth_form.errors, {})
def test_with_hosting_service_new_account(self): form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'test-hosting_account_username': 'testuser', 'test-hosting_account_password': 'testpass', 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'none'}) self.assertTrue(form.is_valid()) self.assertTrue(form.hosting_account_linked) repository = form.save() self.assertEqual(repository.name, 'test') self.assertEqual(repository.hosting_account.username, 'testuser') self.assertEqual(repository.hosting_account.service_name, 'test') self.assertEqual(repository.hosting_account.local_site, None) self.assertEqual(repository.extra_data['repository_plan'], ) self.assertEqual(repository.path, 'http://example.com/testrepo/') self.assertEqual(repository.mirror_path, ) for auth_form in six.itervalues(form.hosting_auth_forms): self.assertEqual(auth_form.errors, {})<|docstring|>Testing RepositoryForm with a hosting service and new account<|endoftext|>
f3937fb99b13329f56698f8b7f8e9b39d9e9e3c14ec0bd043d644eca3b187f80
def test_with_hosting_service_new_account_auth_error(self): 'Testing RepositoryForm with a hosting service and new account and\n authorization error\n ' form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'test-hosting_account_username': 'baduser', 'test-hosting_account_password': 'testpass', 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'none'}) self.assertFalse(form.is_valid()) self.assertFalse(form.hosting_account_linked) self.assertIn('hosting_account', form.errors) self.assertEqual(form.errors['hosting_account'], ['Unable to link the account: The username is very very bad.']) for auth_form in six.itervalues(form.hosting_auth_forms): self.assertEqual(auth_form.errors, {})
Testing RepositoryForm with a hosting service and new account and authorization error
reviewboard/scmtools/tests/test_repository_form.py
test_with_hosting_service_new_account_auth_error
amalik2/reviewboard
2
python
def test_with_hosting_service_new_account_auth_error(self): 'Testing RepositoryForm with a hosting service and new account and\n authorization error\n ' form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'test-hosting_account_username': 'baduser', 'test-hosting_account_password': 'testpass', 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'none'}) self.assertFalse(form.is_valid()) self.assertFalse(form.hosting_account_linked) self.assertIn('hosting_account', form.errors) self.assertEqual(form.errors['hosting_account'], ['Unable to link the account: The username is very very bad.']) for auth_form in six.itervalues(form.hosting_auth_forms): self.assertEqual(auth_form.errors, {})
def test_with_hosting_service_new_account_auth_error(self): 'Testing RepositoryForm with a hosting service and new account and\n authorization error\n ' form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'test-hosting_account_username': 'baduser', 'test-hosting_account_password': 'testpass', 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'none'}) self.assertFalse(form.is_valid()) self.assertFalse(form.hosting_account_linked) self.assertIn('hosting_account', form.errors) self.assertEqual(form.errors['hosting_account'], ['Unable to link the account: The username is very very bad.']) for auth_form in six.itervalues(form.hosting_auth_forms): self.assertEqual(auth_form.errors, {})<|docstring|>Testing RepositoryForm with a hosting service and new account and authorization error<|endoftext|>
770620566cb0a72c8aa06fb8f0ad07eb9d2a9afd47bcca0b80577ca1f2335347
def test_with_hosting_service_new_account_2fa_code_required(self): 'Testing RepositoryForm with a hosting service and new account and\n two-factor auth code required\n ' form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'test-hosting_account_username': '2fa-user', 'test-hosting_account_password': 'testpass', 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'none'}) self.assertFalse(form.is_valid()) self.assertFalse(form.hosting_account_linked) self.assertIn('hosting_account', form.errors) self.assertEqual(form.errors['hosting_account'], ['Enter your 2FA code.']) self.assertTrue(form.hosting_service_info['test']['needs_two_factor_auth_code']) for auth_form in six.itervalues(form.hosting_auth_forms): self.assertEqual(auth_form.errors, {})
Testing RepositoryForm with a hosting service and new account and two-factor auth code required
reviewboard/scmtools/tests/test_repository_form.py
test_with_hosting_service_new_account_2fa_code_required
amalik2/reviewboard
2
python
def test_with_hosting_service_new_account_2fa_code_required(self): 'Testing RepositoryForm with a hosting service and new account and\n two-factor auth code required\n ' form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'test-hosting_account_username': '2fa-user', 'test-hosting_account_password': 'testpass', 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'none'}) self.assertFalse(form.is_valid()) self.assertFalse(form.hosting_account_linked) self.assertIn('hosting_account', form.errors) self.assertEqual(form.errors['hosting_account'], ['Enter your 2FA code.']) self.assertTrue(form.hosting_service_info['test']['needs_two_factor_auth_code']) for auth_form in six.itervalues(form.hosting_auth_forms): self.assertEqual(auth_form.errors, {})
def test_with_hosting_service_new_account_2fa_code_required(self): 'Testing RepositoryForm with a hosting service and new account and\n two-factor auth code required\n ' form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'test-hosting_account_username': '2fa-user', 'test-hosting_account_password': 'testpass', 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'none'}) self.assertFalse(form.is_valid()) self.assertFalse(form.hosting_account_linked) self.assertIn('hosting_account', form.errors) self.assertEqual(form.errors['hosting_account'], ['Enter your 2FA code.']) self.assertTrue(form.hosting_service_info['test']['needs_two_factor_auth_code']) for auth_form in six.itervalues(form.hosting_auth_forms): self.assertEqual(auth_form.errors, {})<|docstring|>Testing RepositoryForm with a hosting service and new account and two-factor auth code required<|endoftext|>
d037d9441302708c5a25ec91c71413a37c2dd7ec0b22f9b9520ba2d1f608311c
def test_with_hosting_service_new_account_2fa_code_provided(self): 'Testing RepositoryForm with a hosting service and new account and\n two-factor auth code provided\n ' form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'test-hosting_account_username': '2fa-user', 'test-hosting_account_password': 'testpass', 'test-hosting_account_two_factor_auth_code': '123456', 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'none'}) self.assertTrue(form.is_valid()) self.assertTrue(form.hosting_account_linked) self.assertFalse(form.hosting_service_info['test']['needs_two_factor_auth_code']) for auth_form in six.itervalues(form.hosting_auth_forms): self.assertEqual(auth_form.errors, {})
Testing RepositoryForm with a hosting service and new account and two-factor auth code provided
reviewboard/scmtools/tests/test_repository_form.py
test_with_hosting_service_new_account_2fa_code_provided
amalik2/reviewboard
2
python
def test_with_hosting_service_new_account_2fa_code_provided(self): 'Testing RepositoryForm with a hosting service and new account and\n two-factor auth code provided\n ' form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'test-hosting_account_username': '2fa-user', 'test-hosting_account_password': 'testpass', 'test-hosting_account_two_factor_auth_code': '123456', 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'none'}) self.assertTrue(form.is_valid()) self.assertTrue(form.hosting_account_linked) self.assertFalse(form.hosting_service_info['test']['needs_two_factor_auth_code']) for auth_form in six.itervalues(form.hosting_auth_forms): self.assertEqual(auth_form.errors, {})
def test_with_hosting_service_new_account_2fa_code_provided(self): 'Testing RepositoryForm with a hosting service and new account and\n two-factor auth code provided\n ' form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'test-hosting_account_username': '2fa-user', 'test-hosting_account_password': 'testpass', 'test-hosting_account_two_factor_auth_code': '123456', 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'none'}) self.assertTrue(form.is_valid()) self.assertTrue(form.hosting_account_linked) self.assertFalse(form.hosting_service_info['test']['needs_two_factor_auth_code']) for auth_form in six.itervalues(form.hosting_auth_forms): self.assertEqual(auth_form.errors, {})<|docstring|>Testing RepositoryForm with a hosting service and new account and two-factor auth code provided<|endoftext|>
1a3d4967bed44c60888047235a1608fdc7ae6fa62eb50e99face0e366a211f91
def test_with_hosting_service_new_account_missing_fields(self): 'Testing RepositoryForm with a hosting service and new account and\n missing fields\n ' form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'none'}) self.assertFalse(form.is_valid()) self.assertFalse(form.hosting_account_linked) self.assertIn('hosting_account_username', form.errors) self.assertIn('hosting_account_password', form.errors) auth_form = form.hosting_auth_forms.pop('test') self.assertIn('hosting_account_username', auth_form.errors) self.assertIn('hosting_account_password', auth_form.errors) for auth_form in six.itervalues(form.hosting_auth_forms): self.assertEqual(auth_form.errors, {})
Testing RepositoryForm with a hosting service and new account and missing fields
reviewboard/scmtools/tests/test_repository_form.py
test_with_hosting_service_new_account_missing_fields
amalik2/reviewboard
2
python
def test_with_hosting_service_new_account_missing_fields(self): 'Testing RepositoryForm with a hosting service and new account and\n missing fields\n ' form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'none'}) self.assertFalse(form.is_valid()) self.assertFalse(form.hosting_account_linked) self.assertIn('hosting_account_username', form.errors) self.assertIn('hosting_account_password', form.errors) auth_form = form.hosting_auth_forms.pop('test') self.assertIn('hosting_account_username', auth_form.errors) self.assertIn('hosting_account_password', auth_form.errors) for auth_form in six.itervalues(form.hosting_auth_forms): self.assertEqual(auth_form.errors, {})
def test_with_hosting_service_new_account_missing_fields(self): 'Testing RepositoryForm with a hosting service and new account and\n missing fields\n ' form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'none'}) self.assertFalse(form.is_valid()) self.assertFalse(form.hosting_account_linked) self.assertIn('hosting_account_username', form.errors) self.assertIn('hosting_account_password', form.errors) auth_form = form.hosting_auth_forms.pop('test') self.assertIn('hosting_account_username', auth_form.errors) self.assertIn('hosting_account_password', auth_form.errors) for auth_form in six.itervalues(form.hosting_auth_forms): self.assertEqual(auth_form.errors, {})<|docstring|>Testing RepositoryForm with a hosting service and new account and missing fields<|endoftext|>
1ab920a4dfaf621e33b84acb597491aedaaaba08eb1ae57d9dfc03d170a2ece9
def test_with_hosting_service_self_hosted_and_new_account(self): 'Testing RepositoryForm with a self-hosted hosting service and new\n account\n ' form = RepositoryForm({'name': 'test', 'hosting_type': 'self_hosted_test', 'self_hosted_test-hosting_url': 'https://myserver.com', 'self_hosted_test-hosting_account_username': 'testuser', 'self_hosted_test-hosting_account_password': 'testpass', 'test_repo_name': 'myrepo', 'tool': self.git_tool_id, 'bug_tracker_type': 'none'}) form.validate_repository = False self.assertTrue(form.is_valid()) self.assertTrue(form.hosting_account_linked) repository = form.save() self.assertEqual(repository.name, 'test') self.assertEqual(repository.hosting_account.hosting_url, 'https://myserver.com') self.assertEqual(repository.hosting_account.username, 'testuser') self.assertEqual(repository.hosting_account.service_name, 'self_hosted_test') self.assertEqual(repository.hosting_account.local_site, None) self.assertEqual(repository.extra_data['test_repo_name'], 'myrepo') self.assertEqual(repository.extra_data['hosting_url'], 'https://myserver.com') self.assertEqual(repository.path, 'https://myserver.com/myrepo/') self.assertEqual(repository.mirror_path, '[email protected]:myrepo/') for auth_form in six.itervalues(form.hosting_auth_forms): self.assertEqual(auth_form.errors, {})
Testing RepositoryForm with a self-hosted hosting service and new account
reviewboard/scmtools/tests/test_repository_form.py
test_with_hosting_service_self_hosted_and_new_account
amalik2/reviewboard
2
python
def test_with_hosting_service_self_hosted_and_new_account(self): 'Testing RepositoryForm with a self-hosted hosting service and new\n account\n ' form = RepositoryForm({'name': 'test', 'hosting_type': 'self_hosted_test', 'self_hosted_test-hosting_url': 'https://myserver.com', 'self_hosted_test-hosting_account_username': 'testuser', 'self_hosted_test-hosting_account_password': 'testpass', 'test_repo_name': 'myrepo', 'tool': self.git_tool_id, 'bug_tracker_type': 'none'}) form.validate_repository = False self.assertTrue(form.is_valid()) self.assertTrue(form.hosting_account_linked) repository = form.save() self.assertEqual(repository.name, 'test') self.assertEqual(repository.hosting_account.hosting_url, 'https://myserver.com') self.assertEqual(repository.hosting_account.username, 'testuser') self.assertEqual(repository.hosting_account.service_name, 'self_hosted_test') self.assertEqual(repository.hosting_account.local_site, None) self.assertEqual(repository.extra_data['test_repo_name'], 'myrepo') self.assertEqual(repository.extra_data['hosting_url'], 'https://myserver.com') self.assertEqual(repository.path, 'https://myserver.com/myrepo/') self.assertEqual(repository.mirror_path, '[email protected]:myrepo/') for auth_form in six.itervalues(form.hosting_auth_forms): self.assertEqual(auth_form.errors, {})
def test_with_hosting_service_self_hosted_and_new_account(self): 'Testing RepositoryForm with a self-hosted hosting service and new\n account\n ' form = RepositoryForm({'name': 'test', 'hosting_type': 'self_hosted_test', 'self_hosted_test-hosting_url': 'https://myserver.com', 'self_hosted_test-hosting_account_username': 'testuser', 'self_hosted_test-hosting_account_password': 'testpass', 'test_repo_name': 'myrepo', 'tool': self.git_tool_id, 'bug_tracker_type': 'none'}) form.validate_repository = False self.assertTrue(form.is_valid()) self.assertTrue(form.hosting_account_linked) repository = form.save() self.assertEqual(repository.name, 'test') self.assertEqual(repository.hosting_account.hosting_url, 'https://myserver.com') self.assertEqual(repository.hosting_account.username, 'testuser') self.assertEqual(repository.hosting_account.service_name, 'self_hosted_test') self.assertEqual(repository.hosting_account.local_site, None) self.assertEqual(repository.extra_data['test_repo_name'], 'myrepo') self.assertEqual(repository.extra_data['hosting_url'], 'https://myserver.com') self.assertEqual(repository.path, 'https://myserver.com/myrepo/') self.assertEqual(repository.mirror_path, '[email protected]:myrepo/') for auth_form in six.itervalues(form.hosting_auth_forms): self.assertEqual(auth_form.errors, {})<|docstring|>Testing RepositoryForm with a self-hosted hosting service and new account<|endoftext|>
e42ce0d327598492d710f2f852be3f63f227b67075bf3345c891d5f9baba07f5
def test_with_hosting_service_self_hosted_and_blank_url(self): 'Testing RepositoryForm with a self-hosted hosting service and blank\n URL\n ' form = RepositoryForm({'name': 'test', 'hosting_type': 'self_hosted_test', 'self_hosted_test-hosting_url': '', 'self_hosted_test-hosting_account_username': 'testuser', 'self_hosted_test-hosting_account_password': 'testpass', 'test_repo_name': 'myrepo', 'tool': self.git_tool_id, 'bug_tracker_type': 'none'}) form.validate_repository = False self.assertFalse(form.is_valid()) self.assertFalse(form.hosting_account_linked)
Testing RepositoryForm with a self-hosted hosting service and blank URL
reviewboard/scmtools/tests/test_repository_form.py
test_with_hosting_service_self_hosted_and_blank_url
amalik2/reviewboard
2
python
def test_with_hosting_service_self_hosted_and_blank_url(self): 'Testing RepositoryForm with a self-hosted hosting service and blank\n URL\n ' form = RepositoryForm({'name': 'test', 'hosting_type': 'self_hosted_test', 'self_hosted_test-hosting_url': , 'self_hosted_test-hosting_account_username': 'testuser', 'self_hosted_test-hosting_account_password': 'testpass', 'test_repo_name': 'myrepo', 'tool': self.git_tool_id, 'bug_tracker_type': 'none'}) form.validate_repository = False self.assertFalse(form.is_valid()) self.assertFalse(form.hosting_account_linked)
def test_with_hosting_service_self_hosted_and_blank_url(self): 'Testing RepositoryForm with a self-hosted hosting service and blank\n URL\n ' form = RepositoryForm({'name': 'test', 'hosting_type': 'self_hosted_test', 'self_hosted_test-hosting_url': , 'self_hosted_test-hosting_account_username': 'testuser', 'self_hosted_test-hosting_account_password': 'testpass', 'test_repo_name': 'myrepo', 'tool': self.git_tool_id, 'bug_tracker_type': 'none'}) form.validate_repository = False self.assertFalse(form.is_valid()) self.assertFalse(form.hosting_account_linked)<|docstring|>Testing RepositoryForm with a self-hosted hosting service and blank URL<|endoftext|>
b84028d041af9176750100d160f00d4c3c448b7f40f5b010a5baf028f15ebf35
def test_with_hosting_service_new_account_localsite(self): 'Testing RepositoryForm with a hosting service, new account and\n LocalSite\n ' local_site = LocalSite.objects.create(name='testsite') form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'test-hosting_account_username': 'testuser', 'test-hosting_account_password': 'testpass', 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'none', 'local_site': local_site.pk}, limit_to_local_site=local_site) self.assertTrue(form.is_valid()) self.assertTrue(form.hosting_account_linked) repository = form.save() self.assertEqual(repository.name, 'test') self.assertEqual(repository.local_site, local_site) self.assertEqual(repository.hosting_account.username, 'testuser') self.assertEqual(repository.hosting_account.service_name, 'test') self.assertEqual(repository.hosting_account.local_site, local_site) self.assertEqual(repository.extra_data['repository_plan'], '')
Testing RepositoryForm with a hosting service, new account and LocalSite
reviewboard/scmtools/tests/test_repository_form.py
test_with_hosting_service_new_account_localsite
amalik2/reviewboard
2
python
def test_with_hosting_service_new_account_localsite(self): 'Testing RepositoryForm with a hosting service, new account and\n LocalSite\n ' local_site = LocalSite.objects.create(name='testsite') form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'test-hosting_account_username': 'testuser', 'test-hosting_account_password': 'testpass', 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'none', 'local_site': local_site.pk}, limit_to_local_site=local_site) self.assertTrue(form.is_valid()) self.assertTrue(form.hosting_account_linked) repository = form.save() self.assertEqual(repository.name, 'test') self.assertEqual(repository.local_site, local_site) self.assertEqual(repository.hosting_account.username, 'testuser') self.assertEqual(repository.hosting_account.service_name, 'test') self.assertEqual(repository.hosting_account.local_site, local_site) self.assertEqual(repository.extra_data['repository_plan'], )
def test_with_hosting_service_new_account_localsite(self): 'Testing RepositoryForm with a hosting service, new account and\n LocalSite\n ' local_site = LocalSite.objects.create(name='testsite') form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'test-hosting_account_username': 'testuser', 'test-hosting_account_password': 'testpass', 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'none', 'local_site': local_site.pk}, limit_to_local_site=local_site) self.assertTrue(form.is_valid()) self.assertTrue(form.hosting_account_linked) repository = form.save() self.assertEqual(repository.name, 'test') self.assertEqual(repository.local_site, local_site) self.assertEqual(repository.hosting_account.username, 'testuser') self.assertEqual(repository.hosting_account.service_name, 'test') self.assertEqual(repository.hosting_account.local_site, local_site) self.assertEqual(repository.extra_data['repository_plan'], )<|docstring|>Testing RepositoryForm with a hosting service, new account and LocalSite<|endoftext|>
e4200e48b31cfdda47c008139fdc9a320216c4694e045b5d3bac9e83bb6d4d91
def test_with_hosting_service_existing_account(self): 'Testing RepositoryForm with a hosting service and existing\n account\n ' account = HostingServiceAccount.objects.create(username='testuser', service_name='test') account.data['password'] = 'testpass' account.save() form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'hosting_account': account.pk, 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'none'}) self.assertTrue(form.is_valid()) self.assertFalse(form.hosting_account_linked) repository = form.save() self.assertEqual(repository.name, 'test') self.assertEqual(repository.hosting_account, account) self.assertEqual(repository.extra_data['repository_plan'], '')
Testing RepositoryForm with a hosting service and existing account
reviewboard/scmtools/tests/test_repository_form.py
test_with_hosting_service_existing_account
amalik2/reviewboard
2
python
def test_with_hosting_service_existing_account(self): 'Testing RepositoryForm with a hosting service and existing\n account\n ' account = HostingServiceAccount.objects.create(username='testuser', service_name='test') account.data['password'] = 'testpass' account.save() form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'hosting_account': account.pk, 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'none'}) self.assertTrue(form.is_valid()) self.assertFalse(form.hosting_account_linked) repository = form.save() self.assertEqual(repository.name, 'test') self.assertEqual(repository.hosting_account, account) self.assertEqual(repository.extra_data['repository_plan'], )
def test_with_hosting_service_existing_account(self): 'Testing RepositoryForm with a hosting service and existing\n account\n ' account = HostingServiceAccount.objects.create(username='testuser', service_name='test') account.data['password'] = 'testpass' account.save() form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'hosting_account': account.pk, 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'none'}) self.assertTrue(form.is_valid()) self.assertFalse(form.hosting_account_linked) repository = form.save() self.assertEqual(repository.name, 'test') self.assertEqual(repository.hosting_account, account) self.assertEqual(repository.extra_data['repository_plan'], )<|docstring|>Testing RepositoryForm with a hosting service and existing account<|endoftext|>
5ebe894dc55ab7081e425b6320d61b304969a703b17ce5852b41fd775ada0dd9
def test_with_hosting_service_existing_account_needs_reauth(self): 'Testing RepositoryForm with a hosting service and existing\n account needing re-authorization\n ' account = HostingServiceAccount.objects.create(username='testuser', service_name='test') form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'hosting_account': account.pk, 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'none'}) self.assertFalse(form.is_valid()) self.assertFalse(form.hosting_account_linked) self.assertEqual(set(form.errors.keys()), set(['hosting_account_username', 'hosting_account_password']))
Testing RepositoryForm with a hosting service and existing account needing re-authorization
reviewboard/scmtools/tests/test_repository_form.py
test_with_hosting_service_existing_account_needs_reauth
amalik2/reviewboard
2
python
def test_with_hosting_service_existing_account_needs_reauth(self): 'Testing RepositoryForm with a hosting service and existing\n account needing re-authorization\n ' account = HostingServiceAccount.objects.create(username='testuser', service_name='test') form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'hosting_account': account.pk, 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'none'}) self.assertFalse(form.is_valid()) self.assertFalse(form.hosting_account_linked) self.assertEqual(set(form.errors.keys()), set(['hosting_account_username', 'hosting_account_password']))
def test_with_hosting_service_existing_account_needs_reauth(self): 'Testing RepositoryForm with a hosting service and existing\n account needing re-authorization\n ' account = HostingServiceAccount.objects.create(username='testuser', service_name='test') form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'hosting_account': account.pk, 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'none'}) self.assertFalse(form.is_valid()) self.assertFalse(form.hosting_account_linked) self.assertEqual(set(form.errors.keys()), set(['hosting_account_username', 'hosting_account_password']))<|docstring|>Testing RepositoryForm with a hosting service and existing account needing re-authorization<|endoftext|>
35e31eac597c32b5ee168ebd602ea8e3b8215e2b1937cf135dde85d917e520e7
def test_with_hosting_service_existing_account_reauthing(self): 'Testing RepositoryForm with a hosting service and existing\n account with re-authorizating\n ' account = HostingServiceAccount.objects.create(username='testuser', service_name='test') form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'hosting_account': account.pk, 'test-hosting_account_username': 'testuser2', 'test-hosting_account_password': 'testpass2', 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'none'}) self.assertTrue(form.is_valid()) self.assertTrue(form.hosting_account_linked) account = HostingServiceAccount.objects.get(pk=account.pk) self.assertEqual(account.username, 'testuser2') self.assertEqual(account.data['password'], 'testpass2')
Testing RepositoryForm with a hosting service and existing account with re-authorizating
reviewboard/scmtools/tests/test_repository_form.py
test_with_hosting_service_existing_account_reauthing
amalik2/reviewboard
2
python
def test_with_hosting_service_existing_account_reauthing(self): 'Testing RepositoryForm with a hosting service and existing\n account with re-authorizating\n ' account = HostingServiceAccount.objects.create(username='testuser', service_name='test') form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'hosting_account': account.pk, 'test-hosting_account_username': 'testuser2', 'test-hosting_account_password': 'testpass2', 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'none'}) self.assertTrue(form.is_valid()) self.assertTrue(form.hosting_account_linked) account = HostingServiceAccount.objects.get(pk=account.pk) self.assertEqual(account.username, 'testuser2') self.assertEqual(account.data['password'], 'testpass2')
def test_with_hosting_service_existing_account_reauthing(self): 'Testing RepositoryForm with a hosting service and existing\n account with re-authorizating\n ' account = HostingServiceAccount.objects.create(username='testuser', service_name='test') form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'hosting_account': account.pk, 'test-hosting_account_username': 'testuser2', 'test-hosting_account_password': 'testpass2', 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'none'}) self.assertTrue(form.is_valid()) self.assertTrue(form.hosting_account_linked) account = HostingServiceAccount.objects.get(pk=account.pk) self.assertEqual(account.username, 'testuser2') self.assertEqual(account.data['password'], 'testpass2')<|docstring|>Testing RepositoryForm with a hosting service and existing account with re-authorizating<|endoftext|>
d1341b7c8f4c5bba7e5e952a54a6856d52f71a333afdd09a080c1ddbe77106b0
def test_with_hosting_service_self_hosted_and_existing_account(self): 'Testing RepositoryForm with a self-hosted hosting service and\n existing account\n ' account = HostingServiceAccount.objects.create(username='testuser', service_name='self_hosted_test', hosting_url='https://example.com') account.data['password'] = 'testpass' account.save() form = RepositoryForm({'name': 'test', 'hosting_type': 'self_hosted_test', 'self_hosted_test-hosting_url': 'https://example.com', 'hosting_account': account.pk, 'tool': self.git_tool_id, 'test_repo_name': 'myrepo', 'bug_tracker_type': 'none'}) form.validate_repository = False self.assertTrue(form.is_valid()) self.assertFalse(form.hosting_account_linked) repository = form.save() self.assertEqual(repository.name, 'test') self.assertEqual(repository.hosting_account, account) self.assertEqual(repository.extra_data['hosting_url'], 'https://example.com')
Testing RepositoryForm with a self-hosted hosting service and existing account
reviewboard/scmtools/tests/test_repository_form.py
test_with_hosting_service_self_hosted_and_existing_account
amalik2/reviewboard
2
python
def test_with_hosting_service_self_hosted_and_existing_account(self): 'Testing RepositoryForm with a self-hosted hosting service and\n existing account\n ' account = HostingServiceAccount.objects.create(username='testuser', service_name='self_hosted_test', hosting_url='https://example.com') account.data['password'] = 'testpass' account.save() form = RepositoryForm({'name': 'test', 'hosting_type': 'self_hosted_test', 'self_hosted_test-hosting_url': 'https://example.com', 'hosting_account': account.pk, 'tool': self.git_tool_id, 'test_repo_name': 'myrepo', 'bug_tracker_type': 'none'}) form.validate_repository = False self.assertTrue(form.is_valid()) self.assertFalse(form.hosting_account_linked) repository = form.save() self.assertEqual(repository.name, 'test') self.assertEqual(repository.hosting_account, account) self.assertEqual(repository.extra_data['hosting_url'], 'https://example.com')
def test_with_hosting_service_self_hosted_and_existing_account(self): 'Testing RepositoryForm with a self-hosted hosting service and\n existing account\n ' account = HostingServiceAccount.objects.create(username='testuser', service_name='self_hosted_test', hosting_url='https://example.com') account.data['password'] = 'testpass' account.save() form = RepositoryForm({'name': 'test', 'hosting_type': 'self_hosted_test', 'self_hosted_test-hosting_url': 'https://example.com', 'hosting_account': account.pk, 'tool': self.git_tool_id, 'test_repo_name': 'myrepo', 'bug_tracker_type': 'none'}) form.validate_repository = False self.assertTrue(form.is_valid()) self.assertFalse(form.hosting_account_linked) repository = form.save() self.assertEqual(repository.name, 'test') self.assertEqual(repository.hosting_account, account) self.assertEqual(repository.extra_data['hosting_url'], 'https://example.com')<|docstring|>Testing RepositoryForm with a self-hosted hosting service and existing account<|endoftext|>
485887a8818d8106e3313c9d23e7b68fa85525f7d88a1f2a9a77b254c53c8498
def test_with_self_hosted_and_invalid_account_service(self): 'Testing RepositoryForm with a self-hosted hosting service and\n invalid existing account due to mismatched service type\n ' account = HostingServiceAccount.objects.create(username='testuser', service_name='self_hosted_test', hosting_url='https://example1.com') account.data['password'] = 'testpass' account.save() form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'hosting_account': account.pk, 'tool': self.git_tool_id, 'test_repo_name': 'myrepo', 'bug_tracker_type': 'none'}) form.validate_repository = False self.assertFalse(form.is_valid()) self.assertFalse(form.hosting_account_linked)
Testing RepositoryForm with a self-hosted hosting service and invalid existing account due to mismatched service type
reviewboard/scmtools/tests/test_repository_form.py
test_with_self_hosted_and_invalid_account_service
amalik2/reviewboard
2
python
def test_with_self_hosted_and_invalid_account_service(self): 'Testing RepositoryForm with a self-hosted hosting service and\n invalid existing account due to mismatched service type\n ' account = HostingServiceAccount.objects.create(username='testuser', service_name='self_hosted_test', hosting_url='https://example1.com') account.data['password'] = 'testpass' account.save() form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'hosting_account': account.pk, 'tool': self.git_tool_id, 'test_repo_name': 'myrepo', 'bug_tracker_type': 'none'}) form.validate_repository = False self.assertFalse(form.is_valid()) self.assertFalse(form.hosting_account_linked)
def test_with_self_hosted_and_invalid_account_service(self): 'Testing RepositoryForm with a self-hosted hosting service and\n invalid existing account due to mismatched service type\n ' account = HostingServiceAccount.objects.create(username='testuser', service_name='self_hosted_test', hosting_url='https://example1.com') account.data['password'] = 'testpass' account.save() form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'hosting_account': account.pk, 'tool': self.git_tool_id, 'test_repo_name': 'myrepo', 'bug_tracker_type': 'none'}) form.validate_repository = False self.assertFalse(form.is_valid()) self.assertFalse(form.hosting_account_linked)<|docstring|>Testing RepositoryForm with a self-hosted hosting service and invalid existing account due to mismatched service type<|endoftext|>
b0364e7f3d62aaebea8e7b862d7199fae9ce09c785e27ee3b649a2a4cfb4e62d
def test_with_self_hosted_and_invalid_account_local_site(self): 'Testing RepositoryForm with a self-hosted hosting service and\n invalid existing account due to mismatched Local Site\n ' account = HostingServiceAccount.objects.create(username='testuser', service_name='self_hosted_test', hosting_url='https://example1.com', local_site=LocalSite.objects.create(name='test-site')) account.data['password'] = 'testpass' account.save() form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'hosting_account': account.pk, 'tool': self.git_tool_id, 'test_repo_name': 'myrepo', 'bug_tracker_type': 'none'}) form.validate_repository = False self.assertFalse(form.is_valid()) self.assertFalse(form.hosting_account_linked)
Testing RepositoryForm with a self-hosted hosting service and invalid existing account due to mismatched Local Site
reviewboard/scmtools/tests/test_repository_form.py
test_with_self_hosted_and_invalid_account_local_site
amalik2/reviewboard
2
python
def test_with_self_hosted_and_invalid_account_local_site(self): 'Testing RepositoryForm with a self-hosted hosting service and\n invalid existing account due to mismatched Local Site\n ' account = HostingServiceAccount.objects.create(username='testuser', service_name='self_hosted_test', hosting_url='https://example1.com', local_site=LocalSite.objects.create(name='test-site')) account.data['password'] = 'testpass' account.save() form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'hosting_account': account.pk, 'tool': self.git_tool_id, 'test_repo_name': 'myrepo', 'bug_tracker_type': 'none'}) form.validate_repository = False self.assertFalse(form.is_valid()) self.assertFalse(form.hosting_account_linked)
def test_with_self_hosted_and_invalid_account_local_site(self): 'Testing RepositoryForm with a self-hosted hosting service and\n invalid existing account due to mismatched Local Site\n ' account = HostingServiceAccount.objects.create(username='testuser', service_name='self_hosted_test', hosting_url='https://example1.com', local_site=LocalSite.objects.create(name='test-site')) account.data['password'] = 'testpass' account.save() form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'hosting_account': account.pk, 'tool': self.git_tool_id, 'test_repo_name': 'myrepo', 'bug_tracker_type': 'none'}) form.validate_repository = False self.assertFalse(form.is_valid()) self.assertFalse(form.hosting_account_linked)<|docstring|>Testing RepositoryForm with a self-hosted hosting service and invalid existing account due to mismatched Local Site<|endoftext|>
586ce546c650b0bcabfcc5b8917c2bc7fb56bd67f176b4a67c30ffdbfc8fbcbd
def test_with_hosting_service_custom_bug_tracker(self): 'Testing RepositoryForm with a custom bug tracker' account = HostingServiceAccount.objects.create(username='testuser', service_name='test') account.data['password'] = 'testpass' account.save() form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'hosting_account': account.pk, 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'custom', 'bug_tracker': 'http://example.com/issue/%s'}) self.assertTrue(form.is_valid()) repository = form.save() self.assertFalse(repository.extra_data['bug_tracker_use_hosting']) self.assertEqual(repository.bug_tracker, 'http://example.com/issue/%s') self.assertNotIn('bug_tracker_type', repository.extra_data)
Testing RepositoryForm with a custom bug tracker
reviewboard/scmtools/tests/test_repository_form.py
test_with_hosting_service_custom_bug_tracker
amalik2/reviewboard
2
python
def test_with_hosting_service_custom_bug_tracker(self): account = HostingServiceAccount.objects.create(username='testuser', service_name='test') account.data['password'] = 'testpass' account.save() form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'hosting_account': account.pk, 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'custom', 'bug_tracker': 'http://example.com/issue/%s'}) self.assertTrue(form.is_valid()) repository = form.save() self.assertFalse(repository.extra_data['bug_tracker_use_hosting']) self.assertEqual(repository.bug_tracker, 'http://example.com/issue/%s') self.assertNotIn('bug_tracker_type', repository.extra_data)
def test_with_hosting_service_custom_bug_tracker(self): account = HostingServiceAccount.objects.create(username='testuser', service_name='test') account.data['password'] = 'testpass' account.save() form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'hosting_account': account.pk, 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'custom', 'bug_tracker': 'http://example.com/issue/%s'}) self.assertTrue(form.is_valid()) repository = form.save() self.assertFalse(repository.extra_data['bug_tracker_use_hosting']) self.assertEqual(repository.bug_tracker, 'http://example.com/issue/%s') self.assertNotIn('bug_tracker_type', repository.extra_data)<|docstring|>Testing RepositoryForm with a custom bug tracker<|endoftext|>
8de14524f75cde8b736d92110c99b440e3c757333ecd9d98542a3bdf0c269d7f
def test_with_hosting_service_bug_tracker_service(self): 'Testing RepositoryForm with a bug tracker service' account = HostingServiceAccount.objects.create(username='testuser', service_name='test') account.data['password'] = 'testpass' account.save() form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'hosting_account': account.pk, 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'test', 'bug_tracker_hosting_account_username': 'testuser', 'bug_tracker-test_repo_name': 'testrepo'}) self.assertTrue(form.is_valid()) repository = form.save() self.assertFalse(repository.extra_data['bug_tracker_use_hosting']) self.assertEqual(repository.bug_tracker, 'http://example.com/testuser/testrepo/issue/%s') self.assertEqual(repository.extra_data['bug_tracker_type'], 'test') self.assertEqual(repository.extra_data['bug_tracker-test_repo_name'], 'testrepo') self.assertEqual(repository.extra_data['bug_tracker-hosting_account_username'], 'testuser')
Testing RepositoryForm with a bug tracker service
reviewboard/scmtools/tests/test_repository_form.py
test_with_hosting_service_bug_tracker_service
amalik2/reviewboard
2
python
def test_with_hosting_service_bug_tracker_service(self): account = HostingServiceAccount.objects.create(username='testuser', service_name='test') account.data['password'] = 'testpass' account.save() form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'hosting_account': account.pk, 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'test', 'bug_tracker_hosting_account_username': 'testuser', 'bug_tracker-test_repo_name': 'testrepo'}) self.assertTrue(form.is_valid()) repository = form.save() self.assertFalse(repository.extra_data['bug_tracker_use_hosting']) self.assertEqual(repository.bug_tracker, 'http://example.com/testuser/testrepo/issue/%s') self.assertEqual(repository.extra_data['bug_tracker_type'], 'test') self.assertEqual(repository.extra_data['bug_tracker-test_repo_name'], 'testrepo') self.assertEqual(repository.extra_data['bug_tracker-hosting_account_username'], 'testuser')
def test_with_hosting_service_bug_tracker_service(self): account = HostingServiceAccount.objects.create(username='testuser', service_name='test') account.data['password'] = 'testpass' account.save() form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'hosting_account': account.pk, 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'test', 'bug_tracker_hosting_account_username': 'testuser', 'bug_tracker-test_repo_name': 'testrepo'}) self.assertTrue(form.is_valid()) repository = form.save() self.assertFalse(repository.extra_data['bug_tracker_use_hosting']) self.assertEqual(repository.bug_tracker, 'http://example.com/testuser/testrepo/issue/%s') self.assertEqual(repository.extra_data['bug_tracker_type'], 'test') self.assertEqual(repository.extra_data['bug_tracker-test_repo_name'], 'testrepo') self.assertEqual(repository.extra_data['bug_tracker-hosting_account_username'], 'testuser')<|docstring|>Testing RepositoryForm with a bug tracker service<|endoftext|>
dc24b45e76010e3b05ceae5d445c460af1404fe697ebc90e7b48353a65e9be61
def test_with_hosting_service_self_hosted_bug_tracker_service(self): 'Testing RepositoryForm with a self-hosted bug tracker service' account = HostingServiceAccount.objects.create(username='testuser', service_name='self_hosted_test', hosting_url='https://example.com') account.data['password'] = 'testpass' account.save() form = RepositoryForm({'name': 'test', 'hosting_type': 'self_hosted_test', 'hosting_url': 'https://example.com', 'hosting_account': account.pk, 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'self_hosted_test', 'bug_tracker_hosting_url': 'https://example.com', 'bug_tracker-test_repo_name': 'testrepo'}) form.validate_repository = False self.assertTrue(form.is_valid()) repository = form.save() self.assertFalse(repository.extra_data['bug_tracker_use_hosting']) self.assertEqual(repository.bug_tracker, 'https://example.com/testrepo/issue/%s') self.assertEqual(repository.extra_data['bug_tracker_type'], 'self_hosted_test') self.assertEqual(repository.extra_data['bug_tracker-test_repo_name'], 'testrepo') self.assertEqual(repository.extra_data['bug_tracker_hosting_url'], 'https://example.com')
Testing RepositoryForm with a self-hosted bug tracker service
reviewboard/scmtools/tests/test_repository_form.py
test_with_hosting_service_self_hosted_bug_tracker_service
amalik2/reviewboard
2
python
def test_with_hosting_service_self_hosted_bug_tracker_service(self): account = HostingServiceAccount.objects.create(username='testuser', service_name='self_hosted_test', hosting_url='https://example.com') account.data['password'] = 'testpass' account.save() form = RepositoryForm({'name': 'test', 'hosting_type': 'self_hosted_test', 'hosting_url': 'https://example.com', 'hosting_account': account.pk, 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'self_hosted_test', 'bug_tracker_hosting_url': 'https://example.com', 'bug_tracker-test_repo_name': 'testrepo'}) form.validate_repository = False self.assertTrue(form.is_valid()) repository = form.save() self.assertFalse(repository.extra_data['bug_tracker_use_hosting']) self.assertEqual(repository.bug_tracker, 'https://example.com/testrepo/issue/%s') self.assertEqual(repository.extra_data['bug_tracker_type'], 'self_hosted_test') self.assertEqual(repository.extra_data['bug_tracker-test_repo_name'], 'testrepo') self.assertEqual(repository.extra_data['bug_tracker_hosting_url'], 'https://example.com')
def test_with_hosting_service_self_hosted_bug_tracker_service(self): account = HostingServiceAccount.objects.create(username='testuser', service_name='self_hosted_test', hosting_url='https://example.com') account.data['password'] = 'testpass' account.save() form = RepositoryForm({'name': 'test', 'hosting_type': 'self_hosted_test', 'hosting_url': 'https://example.com', 'hosting_account': account.pk, 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'self_hosted_test', 'bug_tracker_hosting_url': 'https://example.com', 'bug_tracker-test_repo_name': 'testrepo'}) form.validate_repository = False self.assertTrue(form.is_valid()) repository = form.save() self.assertFalse(repository.extra_data['bug_tracker_use_hosting']) self.assertEqual(repository.bug_tracker, 'https://example.com/testrepo/issue/%s') self.assertEqual(repository.extra_data['bug_tracker_type'], 'self_hosted_test') self.assertEqual(repository.extra_data['bug_tracker-test_repo_name'], 'testrepo') self.assertEqual(repository.extra_data['bug_tracker_hosting_url'], 'https://example.com')<|docstring|>Testing RepositoryForm with a self-hosted bug tracker service<|endoftext|>
bdc933f206cfbbdb9f6b769ee3336194a93ebce352c8924d6810704f7d44abc4
def test_with_hosting_service_with_hosting_bug_tracker(self): "Testing RepositoryForm with hosting service's bug tracker" account = HostingServiceAccount.objects.create(username='testuser', service_name='test') account.data['password'] = 'testpass' account.save() form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'hosting_account': account.pk, 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_use_hosting': True, 'bug_tracker_type': 'googlecode'}) form.validate_repository = False self.assertTrue(form.is_valid()) repository = form.save() self.assertTrue(repository.extra_data['bug_tracker_use_hosting']) self.assertEqual(repository.bug_tracker, 'http://example.com/testuser/testrepo/issue/%s') self.assertNotIn('bug_tracker_type', repository.extra_data) self.assertFalse(('bug_tracker-test_repo_name' in repository.extra_data)) self.assertFalse(('bug_tracker-hosting_account_username' in repository.extra_data))
Testing RepositoryForm with hosting service's bug tracker
reviewboard/scmtools/tests/test_repository_form.py
test_with_hosting_service_with_hosting_bug_tracker
amalik2/reviewboard
2
python
def test_with_hosting_service_with_hosting_bug_tracker(self): account = HostingServiceAccount.objects.create(username='testuser', service_name='test') account.data['password'] = 'testpass' account.save() form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'hosting_account': account.pk, 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_use_hosting': True, 'bug_tracker_type': 'googlecode'}) form.validate_repository = False self.assertTrue(form.is_valid()) repository = form.save() self.assertTrue(repository.extra_data['bug_tracker_use_hosting']) self.assertEqual(repository.bug_tracker, 'http://example.com/testuser/testrepo/issue/%s') self.assertNotIn('bug_tracker_type', repository.extra_data) self.assertFalse(('bug_tracker-test_repo_name' in repository.extra_data)) self.assertFalse(('bug_tracker-hosting_account_username' in repository.extra_data))
def test_with_hosting_service_with_hosting_bug_tracker(self): account = HostingServiceAccount.objects.create(username='testuser', service_name='test') account.data['password'] = 'testpass' account.save() form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'hosting_account': account.pk, 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_use_hosting': True, 'bug_tracker_type': 'googlecode'}) form.validate_repository = False self.assertTrue(form.is_valid()) repository = form.save() self.assertTrue(repository.extra_data['bug_tracker_use_hosting']) self.assertEqual(repository.bug_tracker, 'http://example.com/testuser/testrepo/issue/%s') self.assertNotIn('bug_tracker_type', repository.extra_data) self.assertFalse(('bug_tracker-test_repo_name' in repository.extra_data)) self.assertFalse(('bug_tracker-hosting_account_username' in repository.extra_data))<|docstring|>Testing RepositoryForm with hosting service's bug tracker<|endoftext|>
e593d8c4f3337673017e36556d7cd60739e898c0417848d7688ab9c5d0a1f9a6
def test_with_hosting_service_with_hosting_bug_tracker_and_self_hosted(self): "Testing RepositoryForm with self-hosted hosting service's bug\n tracker\n " account = HostingServiceAccount.objects.create(username='testuser', service_name='self_hosted_test', hosting_url='https://example.com') account.data['password'] = 'testpass' account.save() account.data['authorization'] = {'token': '1234'} account.save() form = RepositoryForm({'name': 'test', 'hosting_type': 'self_hosted_test', 'hosting_url': 'https://example.com', 'hosting_account': account.pk, 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_use_hosting': True, 'bug_tracker_type': 'googlecode'}) form.validate_repository = False self.assertTrue(form.is_valid()) repository = form.save() self.assertTrue(repository.extra_data['bug_tracker_use_hosting']) self.assertEqual(repository.bug_tracker, 'https://example.com/testrepo/issue/%s') self.assertNotIn('bug_tracker_type', repository.extra_data) self.assertFalse(('bug_tracker-test_repo_name' in repository.extra_data)) self.assertFalse(('bug_tracker_hosting_url' in repository.extra_data))
Testing RepositoryForm with self-hosted hosting service's bug tracker
reviewboard/scmtools/tests/test_repository_form.py
test_with_hosting_service_with_hosting_bug_tracker_and_self_hosted
amalik2/reviewboard
2
python
def test_with_hosting_service_with_hosting_bug_tracker_and_self_hosted(self): "Testing RepositoryForm with self-hosted hosting service's bug\n tracker\n " account = HostingServiceAccount.objects.create(username='testuser', service_name='self_hosted_test', hosting_url='https://example.com') account.data['password'] = 'testpass' account.save() account.data['authorization'] = {'token': '1234'} account.save() form = RepositoryForm({'name': 'test', 'hosting_type': 'self_hosted_test', 'hosting_url': 'https://example.com', 'hosting_account': account.pk, 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_use_hosting': True, 'bug_tracker_type': 'googlecode'}) form.validate_repository = False self.assertTrue(form.is_valid()) repository = form.save() self.assertTrue(repository.extra_data['bug_tracker_use_hosting']) self.assertEqual(repository.bug_tracker, 'https://example.com/testrepo/issue/%s') self.assertNotIn('bug_tracker_type', repository.extra_data) self.assertFalse(('bug_tracker-test_repo_name' in repository.extra_data)) self.assertFalse(('bug_tracker_hosting_url' in repository.extra_data))
def test_with_hosting_service_with_hosting_bug_tracker_and_self_hosted(self): "Testing RepositoryForm with self-hosted hosting service's bug\n tracker\n " account = HostingServiceAccount.objects.create(username='testuser', service_name='self_hosted_test', hosting_url='https://example.com') account.data['password'] = 'testpass' account.save() account.data['authorization'] = {'token': '1234'} account.save() form = RepositoryForm({'name': 'test', 'hosting_type': 'self_hosted_test', 'hosting_url': 'https://example.com', 'hosting_account': account.pk, 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_use_hosting': True, 'bug_tracker_type': 'googlecode'}) form.validate_repository = False self.assertTrue(form.is_valid()) repository = form.save() self.assertTrue(repository.extra_data['bug_tracker_use_hosting']) self.assertEqual(repository.bug_tracker, 'https://example.com/testrepo/issue/%s') self.assertNotIn('bug_tracker_type', repository.extra_data) self.assertFalse(('bug_tracker-test_repo_name' in repository.extra_data)) self.assertFalse(('bug_tracker_hosting_url' in repository.extra_data))<|docstring|>Testing RepositoryForm with self-hosted hosting service's bug tracker<|endoftext|>
393590ac11c24985642ba17032d3bd169c54e9f33e35008f429fc4f7da8176fb
def test_with_hosting_service_no_bug_tracker(self): 'Testing RepositoryForm with no bug tracker' account = HostingServiceAccount.objects.create(username='testuser', service_name='test') account.data['password'] = 'testpass' account.save() form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'hosting_account': account.pk, 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'none'}) self.assertTrue(form.is_valid()) repository = form.save() self.assertFalse(repository.extra_data['bug_tracker_use_hosting']) self.assertEqual(repository.bug_tracker, '') self.assertNotIn('bug_tracker_type', repository.extra_data)
Testing RepositoryForm with no bug tracker
reviewboard/scmtools/tests/test_repository_form.py
test_with_hosting_service_no_bug_tracker
amalik2/reviewboard
2
python
def test_with_hosting_service_no_bug_tracker(self): account = HostingServiceAccount.objects.create(username='testuser', service_name='test') account.data['password'] = 'testpass' account.save() form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'hosting_account': account.pk, 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'none'}) self.assertTrue(form.is_valid()) repository = form.save() self.assertFalse(repository.extra_data['bug_tracker_use_hosting']) self.assertEqual(repository.bug_tracker, ) self.assertNotIn('bug_tracker_type', repository.extra_data)
def test_with_hosting_service_no_bug_tracker(self): account = HostingServiceAccount.objects.create(username='testuser', service_name='test') account.data['password'] = 'testpass' account.save() form = RepositoryForm({'name': 'test', 'hosting_type': 'test', 'hosting_account': account.pk, 'tool': self.git_tool_id, 'test_repo_name': 'testrepo', 'bug_tracker_type': 'none'}) self.assertTrue(form.is_valid()) repository = form.save() self.assertFalse(repository.extra_data['bug_tracker_use_hosting']) self.assertEqual(repository.bug_tracker, ) self.assertNotIn('bug_tracker_type', repository.extra_data)<|docstring|>Testing RepositoryForm with no bug tracker<|endoftext|>
dc752d49d6ae818995f9715f5cf08509fff261f6ceb69d73d3fb8cd254a2fa47
def test_with_hosting_service_with_existing_custom_bug_tracker(self): 'Testing RepositoryForm with existing custom bug tracker' repository = Repository(name='test', bug_tracker='http://example.com/issue/%s') form = RepositoryForm(instance=repository) self.assertFalse(form._get_field_data('bug_tracker_use_hosting')) self.assertEqual(form._get_field_data('bug_tracker_type'), 'custom') self.assertEqual(form.initial['bug_tracker'], 'http://example.com/issue/%s')
Testing RepositoryForm with existing custom bug tracker
reviewboard/scmtools/tests/test_repository_form.py
test_with_hosting_service_with_existing_custom_bug_tracker
amalik2/reviewboard
2
python
def test_with_hosting_service_with_existing_custom_bug_tracker(self): repository = Repository(name='test', bug_tracker='http://example.com/issue/%s') form = RepositoryForm(instance=repository) self.assertFalse(form._get_field_data('bug_tracker_use_hosting')) self.assertEqual(form._get_field_data('bug_tracker_type'), 'custom') self.assertEqual(form.initial['bug_tracker'], 'http://example.com/issue/%s')
def test_with_hosting_service_with_existing_custom_bug_tracker(self): repository = Repository(name='test', bug_tracker='http://example.com/issue/%s') form = RepositoryForm(instance=repository) self.assertFalse(form._get_field_data('bug_tracker_use_hosting')) self.assertEqual(form._get_field_data('bug_tracker_type'), 'custom') self.assertEqual(form.initial['bug_tracker'], 'http://example.com/issue/%s')<|docstring|>Testing RepositoryForm with existing custom bug tracker<|endoftext|>
32b09b6a78ece2264659143b554b8e3fc9bd74538d8091a7ae1ebec3313f2d56
def test_with_hosting_service_with_existing_bug_tracker_service(self): 'Testing RepositoryForm with existing bug tracker service' repository = Repository(name='test') repository.extra_data['bug_tracker_type'] = 'test' repository.extra_data['bug_tracker-test_repo_name'] = 'testrepo' repository.extra_data['bug_tracker-hosting_account_username'] = 'testuser' form = RepositoryForm(instance=repository) self.assertFalse(form._get_field_data('bug_tracker_use_hosting')) self.assertEqual(form._get_field_data('bug_tracker_type'), 'test') self.assertEqual(form._get_field_data('bug_tracker_hosting_account_username'), 'testuser') self.assertIn('test', form.bug_tracker_forms) self.assertIn('default', form.bug_tracker_forms['test']) bitbucket_form = form.bug_tracker_forms['test']['default'] self.assertEqual(bitbucket_form.fields['test_repo_name'].initial, 'testrepo')
Testing RepositoryForm with existing bug tracker service
reviewboard/scmtools/tests/test_repository_form.py
test_with_hosting_service_with_existing_bug_tracker_service
amalik2/reviewboard
2
python
def test_with_hosting_service_with_existing_bug_tracker_service(self): repository = Repository(name='test') repository.extra_data['bug_tracker_type'] = 'test' repository.extra_data['bug_tracker-test_repo_name'] = 'testrepo' repository.extra_data['bug_tracker-hosting_account_username'] = 'testuser' form = RepositoryForm(instance=repository) self.assertFalse(form._get_field_data('bug_tracker_use_hosting')) self.assertEqual(form._get_field_data('bug_tracker_type'), 'test') self.assertEqual(form._get_field_data('bug_tracker_hosting_account_username'), 'testuser') self.assertIn('test', form.bug_tracker_forms) self.assertIn('default', form.bug_tracker_forms['test']) bitbucket_form = form.bug_tracker_forms['test']['default'] self.assertEqual(bitbucket_form.fields['test_repo_name'].initial, 'testrepo')
def test_with_hosting_service_with_existing_bug_tracker_service(self): repository = Repository(name='test') repository.extra_data['bug_tracker_type'] = 'test' repository.extra_data['bug_tracker-test_repo_name'] = 'testrepo' repository.extra_data['bug_tracker-hosting_account_username'] = 'testuser' form = RepositoryForm(instance=repository) self.assertFalse(form._get_field_data('bug_tracker_use_hosting')) self.assertEqual(form._get_field_data('bug_tracker_type'), 'test') self.assertEqual(form._get_field_data('bug_tracker_hosting_account_username'), 'testuser') self.assertIn('test', form.bug_tracker_forms) self.assertIn('default', form.bug_tracker_forms['test']) bitbucket_form = form.bug_tracker_forms['test']['default'] self.assertEqual(bitbucket_form.fields['test_repo_name'].initial, 'testrepo')<|docstring|>Testing RepositoryForm with existing bug tracker service<|endoftext|>
9b71cdc444bac6a14a91e1b16426c08602db731880ad4f6eddd81d01a6982501
def test_with_hosting_service_with_existing_bug_tracker_using_hosting(self): 'Testing RepositoryForm with existing bug tracker using hosting\n service\n ' account = HostingServiceAccount.objects.create(username='testuser', service_name='test') repository = Repository(name='test', hosting_account=account) repository.extra_data['bug_tracker_use_hosting'] = True repository.extra_data['test_repo_name'] = 'testrepo' form = RepositoryForm(instance=repository) self.assertTrue(form._get_field_data('bug_tracker_use_hosting'))
Testing RepositoryForm with existing bug tracker using hosting service
reviewboard/scmtools/tests/test_repository_form.py
test_with_hosting_service_with_existing_bug_tracker_using_hosting
amalik2/reviewboard
2
python
def test_with_hosting_service_with_existing_bug_tracker_using_hosting(self): 'Testing RepositoryForm with existing bug tracker using hosting\n service\n ' account = HostingServiceAccount.objects.create(username='testuser', service_name='test') repository = Repository(name='test', hosting_account=account) repository.extra_data['bug_tracker_use_hosting'] = True repository.extra_data['test_repo_name'] = 'testrepo' form = RepositoryForm(instance=repository) self.assertTrue(form._get_field_data('bug_tracker_use_hosting'))
def test_with_hosting_service_with_existing_bug_tracker_using_hosting(self): 'Testing RepositoryForm with existing bug tracker using hosting\n service\n ' account = HostingServiceAccount.objects.create(username='testuser', service_name='test') repository = Repository(name='test', hosting_account=account) repository.extra_data['bug_tracker_use_hosting'] = True repository.extra_data['test_repo_name'] = 'testrepo' form = RepositoryForm(instance=repository) self.assertTrue(form._get_field_data('bug_tracker_use_hosting'))<|docstring|>Testing RepositoryForm with existing bug tracker using hosting service<|endoftext|>
26e10944153a4e18c616a590ba108f4eb7010292f87ced3a6f35c8d43a625dec
def test_bound_forms_with_post_with_repository_service(self): 'Testing RepositoryForm binds hosting service forms only if matching\n posted repository hosting_service using default plan\n ' form = RepositoryForm({'name': 'test', 'hosting_type': 'test'}) for (hosting_type, repo_forms) in six.iteritems(form.repository_forms): for (plan_id, repo_form) in six.iteritems(repo_forms): self.assertEqual(repo_form.is_bound, ((hosting_type == 'test') and (plan_id == form.DEFAULT_PLAN_ID))) for (hosting_type, bug_forms) in six.iteritems(form.bug_tracker_forms): for (plan_id, bug_form) in six.iteritems(bug_forms): self.assertFalse(bug_form.is_bound) for (hosting_type, auth_form) in six.iteritems(form.hosting_auth_forms): self.assertFalse(auth_form.is_bound)
Testing RepositoryForm binds hosting service forms only if matching posted repository hosting_service using default plan
reviewboard/scmtools/tests/test_repository_form.py
test_bound_forms_with_post_with_repository_service
amalik2/reviewboard
2
python
def test_bound_forms_with_post_with_repository_service(self): 'Testing RepositoryForm binds hosting service forms only if matching\n posted repository hosting_service using default plan\n ' form = RepositoryForm({'name': 'test', 'hosting_type': 'test'}) for (hosting_type, repo_forms) in six.iteritems(form.repository_forms): for (plan_id, repo_form) in six.iteritems(repo_forms): self.assertEqual(repo_form.is_bound, ((hosting_type == 'test') and (plan_id == form.DEFAULT_PLAN_ID))) for (hosting_type, bug_forms) in six.iteritems(form.bug_tracker_forms): for (plan_id, bug_form) in six.iteritems(bug_forms): self.assertFalse(bug_form.is_bound) for (hosting_type, auth_form) in six.iteritems(form.hosting_auth_forms): self.assertFalse(auth_form.is_bound)
def test_bound_forms_with_post_with_repository_service(self): 'Testing RepositoryForm binds hosting service forms only if matching\n posted repository hosting_service using default plan\n ' form = RepositoryForm({'name': 'test', 'hosting_type': 'test'}) for (hosting_type, repo_forms) in six.iteritems(form.repository_forms): for (plan_id, repo_form) in six.iteritems(repo_forms): self.assertEqual(repo_form.is_bound, ((hosting_type == 'test') and (plan_id == form.DEFAULT_PLAN_ID))) for (hosting_type, bug_forms) in six.iteritems(form.bug_tracker_forms): for (plan_id, bug_form) in six.iteritems(bug_forms): self.assertFalse(bug_form.is_bound) for (hosting_type, auth_form) in six.iteritems(form.hosting_auth_forms): self.assertFalse(auth_form.is_bound)<|docstring|>Testing RepositoryForm binds hosting service forms only if matching posted repository hosting_service using default plan<|endoftext|>
1ada1792349eb82ccbed60977d602cbab5c5ef1f65f6912fe9f8fd4af2992d93
def test_bound_forms_with_post_with_bug_tracker_service(self): 'Testing RepositoryForm binds hosting service forms only if matching\n posted bug tracker hosting_service using default plan\n ' form = RepositoryForm({'name': 'test', 'bug_tracker_type': 'test'}) for (hosting_type, bug_forms) in six.iteritems(form.bug_tracker_forms): for (plan_id, bug_form) in six.iteritems(bug_forms): self.assertEqual(bug_form.is_bound, ((hosting_type == 'test') and (plan_id == form.DEFAULT_PLAN_ID))) for (hosting_type, repo_forms) in six.iteritems(form.repository_forms): for (plan_id, repo_form) in six.iteritems(repo_forms): self.assertFalse(repo_form.is_bound) for (hosting_type, auth_form) in six.iteritems(form.hosting_auth_forms): self.assertFalse(auth_form.is_bound)
Testing RepositoryForm binds hosting service forms only if matching posted bug tracker hosting_service using default plan
reviewboard/scmtools/tests/test_repository_form.py
test_bound_forms_with_post_with_bug_tracker_service
amalik2/reviewboard
2
python
def test_bound_forms_with_post_with_bug_tracker_service(self): 'Testing RepositoryForm binds hosting service forms only if matching\n posted bug tracker hosting_service using default plan\n ' form = RepositoryForm({'name': 'test', 'bug_tracker_type': 'test'}) for (hosting_type, bug_forms) in six.iteritems(form.bug_tracker_forms): for (plan_id, bug_form) in six.iteritems(bug_forms): self.assertEqual(bug_form.is_bound, ((hosting_type == 'test') and (plan_id == form.DEFAULT_PLAN_ID))) for (hosting_type, repo_forms) in six.iteritems(form.repository_forms): for (plan_id, repo_form) in six.iteritems(repo_forms): self.assertFalse(repo_form.is_bound) for (hosting_type, auth_form) in six.iteritems(form.hosting_auth_forms): self.assertFalse(auth_form.is_bound)
def test_bound_forms_with_post_with_bug_tracker_service(self): 'Testing RepositoryForm binds hosting service forms only if matching\n posted bug tracker hosting_service using default plan\n ' form = RepositoryForm({'name': 'test', 'bug_tracker_type': 'test'}) for (hosting_type, bug_forms) in six.iteritems(form.bug_tracker_forms): for (plan_id, bug_form) in six.iteritems(bug_forms): self.assertEqual(bug_form.is_bound, ((hosting_type == 'test') and (plan_id == form.DEFAULT_PLAN_ID))) for (hosting_type, repo_forms) in six.iteritems(form.repository_forms): for (plan_id, repo_form) in six.iteritems(repo_forms): self.assertFalse(repo_form.is_bound) for (hosting_type, auth_form) in six.iteritems(form.hosting_auth_forms): self.assertFalse(auth_form.is_bound)<|docstring|>Testing RepositoryForm binds hosting service forms only if matching posted bug tracker hosting_service using default plan<|endoftext|>
125580f3e3f5a31ceaf41d986d34197f2b1a8e2c776e8de9e8b69823b6102eff
def test_bound_forms_with_post_with_repo_service_and_plan(self): 'Testing RepositoryForm binds hosting service forms only if matching\n posted repository hosting_service with specific plans\n ' form = RepositoryForm({'name': 'test', 'hosting_type': 'github', 'repository_plan': 'public'}) for (hosting_type, repo_forms) in six.iteritems(form.repository_forms): for (plan_id, repo_form) in six.iteritems(repo_forms): self.assertEqual(repo_form.is_bound, ((hosting_type == 'github') and (plan_id == 'public'))) for (hosting_type, bug_forms) in six.iteritems(form.bug_tracker_forms): for (plan_id, bug_form) in six.iteritems(bug_forms): self.assertFalse(bug_form.is_bound) for (hosting_type, auth_form) in six.iteritems(form.hosting_auth_forms): self.assertFalse(auth_form.is_bound)
Testing RepositoryForm binds hosting service forms only if matching posted repository hosting_service with specific plans
reviewboard/scmtools/tests/test_repository_form.py
test_bound_forms_with_post_with_repo_service_and_plan
amalik2/reviewboard
2
python
def test_bound_forms_with_post_with_repo_service_and_plan(self): 'Testing RepositoryForm binds hosting service forms only if matching\n posted repository hosting_service with specific plans\n ' form = RepositoryForm({'name': 'test', 'hosting_type': 'github', 'repository_plan': 'public'}) for (hosting_type, repo_forms) in six.iteritems(form.repository_forms): for (plan_id, repo_form) in six.iteritems(repo_forms): self.assertEqual(repo_form.is_bound, ((hosting_type == 'github') and (plan_id == 'public'))) for (hosting_type, bug_forms) in six.iteritems(form.bug_tracker_forms): for (plan_id, bug_form) in six.iteritems(bug_forms): self.assertFalse(bug_form.is_bound) for (hosting_type, auth_form) in six.iteritems(form.hosting_auth_forms): self.assertFalse(auth_form.is_bound)
def test_bound_forms_with_post_with_repo_service_and_plan(self): 'Testing RepositoryForm binds hosting service forms only if matching\n posted repository hosting_service with specific plans\n ' form = RepositoryForm({'name': 'test', 'hosting_type': 'github', 'repository_plan': 'public'}) for (hosting_type, repo_forms) in six.iteritems(form.repository_forms): for (plan_id, repo_form) in six.iteritems(repo_forms): self.assertEqual(repo_form.is_bound, ((hosting_type == 'github') and (plan_id == 'public'))) for (hosting_type, bug_forms) in six.iteritems(form.bug_tracker_forms): for (plan_id, bug_form) in six.iteritems(bug_forms): self.assertFalse(bug_form.is_bound) for (hosting_type, auth_form) in six.iteritems(form.hosting_auth_forms): self.assertFalse(auth_form.is_bound)<|docstring|>Testing RepositoryForm binds hosting service forms only if matching posted repository hosting_service with specific plans<|endoftext|>
175ffa33cfe35ba1e3e9d13412df281b4af2bcf825b9bac10fa1e4aebeab2d04
def test_bound_forms_with_post_with_bug_tracker_service_and_plan(self): 'Testing RepositoryForm binds hosting service forms only if matching\n posted bug tracker hosting_service with specific plans\n ' form = RepositoryForm({'name': 'test', 'bug_tracker_type': 'github', 'bug_tracker_plan': 'public'}) for (hosting_type, bug_forms) in six.iteritems(form.bug_tracker_forms): for (plan_id, bug_form) in six.iteritems(bug_forms): self.assertEqual(bug_form.is_bound, ((hosting_type == 'github') and (plan_id == 'public'))) for (hosting_type, repo_forms) in six.iteritems(form.repository_forms): for (plan_id, repo_form) in six.iteritems(repo_forms): self.assertFalse(repo_form.is_bound) for (hosting_type, auth_form) in six.iteritems(form.hosting_auth_forms): self.assertFalse(auth_form.is_bound)
Testing RepositoryForm binds hosting service forms only if matching posted bug tracker hosting_service with specific plans
reviewboard/scmtools/tests/test_repository_form.py
test_bound_forms_with_post_with_bug_tracker_service_and_plan
amalik2/reviewboard
2
python
def test_bound_forms_with_post_with_bug_tracker_service_and_plan(self): 'Testing RepositoryForm binds hosting service forms only if matching\n posted bug tracker hosting_service with specific plans\n ' form = RepositoryForm({'name': 'test', 'bug_tracker_type': 'github', 'bug_tracker_plan': 'public'}) for (hosting_type, bug_forms) in six.iteritems(form.bug_tracker_forms): for (plan_id, bug_form) in six.iteritems(bug_forms): self.assertEqual(bug_form.is_bound, ((hosting_type == 'github') and (plan_id == 'public'))) for (hosting_type, repo_forms) in six.iteritems(form.repository_forms): for (plan_id, repo_form) in six.iteritems(repo_forms): self.assertFalse(repo_form.is_bound) for (hosting_type, auth_form) in six.iteritems(form.hosting_auth_forms): self.assertFalse(auth_form.is_bound)
def test_bound_forms_with_post_with_bug_tracker_service_and_plan(self): 'Testing RepositoryForm binds hosting service forms only if matching\n posted bug tracker hosting_service with specific plans\n ' form = RepositoryForm({'name': 'test', 'bug_tracker_type': 'github', 'bug_tracker_plan': 'public'}) for (hosting_type, bug_forms) in six.iteritems(form.bug_tracker_forms): for (plan_id, bug_form) in six.iteritems(bug_forms): self.assertEqual(bug_form.is_bound, ((hosting_type == 'github') and (plan_id == 'public'))) for (hosting_type, repo_forms) in six.iteritems(form.repository_forms): for (plan_id, repo_form) in six.iteritems(repo_forms): self.assertFalse(repo_form.is_bound) for (hosting_type, auth_form) in six.iteritems(form.hosting_auth_forms): self.assertFalse(auth_form.is_bound)<|docstring|>Testing RepositoryForm binds hosting service forms only if matching posted bug tracker hosting_service with specific plans<|endoftext|>
da8970fdad9d087d8761588ccf4bc2096e01d370d596e179bf3a80a692f88609
def test_with_set_access_list(self): 'Testing RepositoryForm with setting users access list' user1 = User.objects.create(username='user1') user2 = User.objects.create(username='user2') User.objects.create(username='user3') group1 = self.create_review_group(name='group1', invite_only=True) group2 = self.create_review_group(name='group2', invite_only=True) self.create_review_group(name='group3', invite_only=True) form = RepositoryForm({'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none', 'public': False, 'users': [user1.pk, user2.pk], 'review_groups': [group1.pk, group2.pk]}) form.is_valid() self.assertTrue(form.is_valid()) repository = form.save() self.assertFalse(repository.public) self.assertEqual(list(repository.users.all()), [user1, user2]) self.assertEqual(list(repository.review_groups.all()), [group1, group2])
Testing RepositoryForm with setting users access list
reviewboard/scmtools/tests/test_repository_form.py
test_with_set_access_list
amalik2/reviewboard
2
python
def test_with_set_access_list(self): user1 = User.objects.create(username='user1') user2 = User.objects.create(username='user2') User.objects.create(username='user3') group1 = self.create_review_group(name='group1', invite_only=True) group2 = self.create_review_group(name='group2', invite_only=True) self.create_review_group(name='group3', invite_only=True) form = RepositoryForm({'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none', 'public': False, 'users': [user1.pk, user2.pk], 'review_groups': [group1.pk, group2.pk]}) form.is_valid() self.assertTrue(form.is_valid()) repository = form.save() self.assertFalse(repository.public) self.assertEqual(list(repository.users.all()), [user1, user2]) self.assertEqual(list(repository.review_groups.all()), [group1, group2])
def test_with_set_access_list(self): user1 = User.objects.create(username='user1') user2 = User.objects.create(username='user2') User.objects.create(username='user3') group1 = self.create_review_group(name='group1', invite_only=True) group2 = self.create_review_group(name='group2', invite_only=True) self.create_review_group(name='group3', invite_only=True) form = RepositoryForm({'name': 'test', 'hosting_type': 'custom', 'tool': self.git_tool_id, 'path': '/path/to/test.git', 'bug_tracker_type': 'none', 'public': False, 'users': [user1.pk, user2.pk], 'review_groups': [group1.pk, group2.pk]}) form.is_valid() self.assertTrue(form.is_valid()) repository = form.save() self.assertFalse(repository.public) self.assertEqual(list(repository.users.all()), [user1, user2]) self.assertEqual(list(repository.review_groups.all()), [group1, group2])<|docstring|>Testing RepositoryForm with setting users access list<|endoftext|>
70ce8ea4ae477ccd720c8e62f40f308c36c043dfddb8b364d32153c6a4535814
def displacements(self, paths, **kwargs): '\n Return vector\n ' init = self.coords[(..., (- 1), nax)] p = (coords or self.coords) return (p - init)
Return vector
taps/coords/cartesian.py
displacements
schinavro/taps
0
python
def displacements(self, paths, **kwargs): '\n \n ' init = self.coords[(..., (- 1), nax)] p = (coords or self.coords) return (p - init)
def displacements(self, paths, **kwargs): '\n \n ' init = self.coords[(..., (- 1), nax)] p = (coords or self.coords) return (p - init)<|docstring|>Return vector<|endoftext|>
c00ad0f899e4e86f5d6c0a1ccb218fe067ff1db2c82da53db9a8b9e6b13fe770
def velocities(self, paths, coords=None, epoch=None, index=np.s_[:]): ' Return velocity at each step\n Get coords and return DxN or 3xAxN array, two point moving average.\n\n :math:`v[i] = (x[i+1] - x[i]) / dt`\n\n Parameters\n ----------\n coords : array\n size of DxN or 3xAxN\n epoch : float\n total time step.\n index : slice obj; Default `np.s_[:]`\n Choose the steps want it to be returned. Default is all steps.\n ' p = (coords or self.coords.copy()) dt = self.dt if (index == np.s_[:]): p = np.concatenate([p, p[(..., (- 1), nax)]], axis=(- 1)) return ((p[(..., 1:)] - p[(..., :(- 1))]) / dt) elif (index == np.s_[1:(- 1)]): return ((p[(..., 2:)] - p[(..., 1:(- 1))]) / dt) i = np.arange(N)[index] if (i[(- 1)] == (N - 1)): p = concatenate([p, p[(..., (- 1), nax)]], axis=(- 1)) return ((p[(..., i)] - p[(..., (i - 1))]) / dt)
Return velocity at each step Get coords and return DxN or 3xAxN array, two point moving average. :math:`v[i] = (x[i+1] - x[i]) / dt` Parameters ---------- coords : array size of DxN or 3xAxN epoch : float total time step. index : slice obj; Default `np.s_[:]` Choose the steps want it to be returned. Default is all steps.
taps/coords/cartesian.py
velocities
schinavro/taps
0
python
def velocities(self, paths, coords=None, epoch=None, index=np.s_[:]): ' Return velocity at each step\n Get coords and return DxN or 3xAxN array, two point moving average.\n\n :math:`v[i] = (x[i+1] - x[i]) / dt`\n\n Parameters\n ----------\n coords : array\n size of DxN or 3xAxN\n epoch : float\n total time step.\n index : slice obj; Default `np.s_[:]`\n Choose the steps want it to be returned. Default is all steps.\n ' p = (coords or self.coords.copy()) dt = self.dt if (index == np.s_[:]): p = np.concatenate([p, p[(..., (- 1), nax)]], axis=(- 1)) return ((p[(..., 1:)] - p[(..., :(- 1))]) / dt) elif (index == np.s_[1:(- 1)]): return ((p[(..., 2:)] - p[(..., 1:(- 1))]) / dt) i = np.arange(N)[index] if (i[(- 1)] == (N - 1)): p = concatenate([p, p[(..., (- 1), nax)]], axis=(- 1)) return ((p[(..., i)] - p[(..., (i - 1))]) / dt)
def velocities(self, paths, coords=None, epoch=None, index=np.s_[:]): ' Return velocity at each step\n Get coords and return DxN or 3xAxN array, two point moving average.\n\n :math:`v[i] = (x[i+1] - x[i]) / dt`\n\n Parameters\n ----------\n coords : array\n size of DxN or 3xAxN\n epoch : float\n total time step.\n index : slice obj; Default `np.s_[:]`\n Choose the steps want it to be returned. Default is all steps.\n ' p = (coords or self.coords.copy()) dt = self.dt if (index == np.s_[:]): p = np.concatenate([p, p[(..., (- 1), nax)]], axis=(- 1)) return ((p[(..., 1:)] - p[(..., :(- 1))]) / dt) elif (index == np.s_[1:(- 1)]): return ((p[(..., 2:)] - p[(..., 1:(- 1))]) / dt) i = np.arange(N)[index] if (i[(- 1)] == (N - 1)): p = concatenate([p, p[(..., (- 1), nax)]], axis=(- 1)) return ((p[(..., i)] - p[(..., (i - 1))]) / dt)<|docstring|>Return velocity at each step Get coords and return DxN or 3xAxN array, two point moving average. :math:`v[i] = (x[i+1] - x[i]) / dt` Parameters ---------- coords : array size of DxN or 3xAxN epoch : float total time step. index : slice obj; Default `np.s_[:]` Choose the steps want it to be returned. Default is all steps.<|endoftext|>
510d3ab442da16cbe12591f7f73bce2aaa964cc196ed2acc7b6e95163f7a7a4d
def accelerations(self, paths, coords=None, index=np.s_[:]): ' Return acceleration at each step\n Get Dx N ndarray, Returns 3xNxP - 1 array, use three point to get\n acceleration\n\n :math:`a[i] = (2x[i] - x[i+1] - x[i-1]) / dtdt`\n\n Parameters\n ----------\n coords : array\n size of DxN or 3xAxN\n epoch : float\n total time step.\n index : slice obj; Default `np.s_[:]`\n Choose the steps want it to be returned. Default is all steps.\n ' p = (coords or self.coords.copy()) dt = self.dt ddt = (dt * dt) if (index == np.s_[:]): p = concatenate([p[(..., 0, nax)], p, p[(..., (- 1), nax)]], axis=(- 1)) return ((((2 * p[(..., 1:(- 1))]) - p[(..., :(- 2))]) - p[(..., 2:)]) / ddt) elif (index == np.s_[1:(- 1)]): return ((((2 * p[(..., 1:(- 1))]) - p[(..., :(- 2))]) - p[(..., 2:)]) / ddt) i = np.arange(N)[index] if (i[0] == 0): p = concatenate([p[(..., 0, nax)], p], axis=(- 1)) i += 1 if (i[(- 1)] == (N - 1)): p = concatenate([p, p[(..., (- 1), nax)]], axis=(- 1)) return ((((2 * p[(..., i)]) - p[(..., (i - 1))]) - p[(..., (i + 1))]) / ddt)
Return acceleration at each step Get Dx N ndarray, Returns 3xNxP - 1 array, use three point to get acceleration :math:`a[i] = (2x[i] - x[i+1] - x[i-1]) / dtdt` Parameters ---------- coords : array size of DxN or 3xAxN epoch : float total time step. index : slice obj; Default `np.s_[:]` Choose the steps want it to be returned. Default is all steps.
taps/coords/cartesian.py
accelerations
schinavro/taps
0
python
def accelerations(self, paths, coords=None, index=np.s_[:]): ' Return acceleration at each step\n Get Dx N ndarray, Returns 3xNxP - 1 array, use three point to get\n acceleration\n\n :math:`a[i] = (2x[i] - x[i+1] - x[i-1]) / dtdt`\n\n Parameters\n ----------\n coords : array\n size of DxN or 3xAxN\n epoch : float\n total time step.\n index : slice obj; Default `np.s_[:]`\n Choose the steps want it to be returned. Default is all steps.\n ' p = (coords or self.coords.copy()) dt = self.dt ddt = (dt * dt) if (index == np.s_[:]): p = concatenate([p[(..., 0, nax)], p, p[(..., (- 1), nax)]], axis=(- 1)) return ((((2 * p[(..., 1:(- 1))]) - p[(..., :(- 2))]) - p[(..., 2:)]) / ddt) elif (index == np.s_[1:(- 1)]): return ((((2 * p[(..., 1:(- 1))]) - p[(..., :(- 2))]) - p[(..., 2:)]) / ddt) i = np.arange(N)[index] if (i[0] == 0): p = concatenate([p[(..., 0, nax)], p], axis=(- 1)) i += 1 if (i[(- 1)] == (N - 1)): p = concatenate([p, p[(..., (- 1), nax)]], axis=(- 1)) return ((((2 * p[(..., i)]) - p[(..., (i - 1))]) - p[(..., (i + 1))]) / ddt)
def accelerations(self, paths, coords=None, index=np.s_[:]): ' Return acceleration at each step\n Get Dx N ndarray, Returns 3xNxP - 1 array, use three point to get\n acceleration\n\n :math:`a[i] = (2x[i] - x[i+1] - x[i-1]) / dtdt`\n\n Parameters\n ----------\n coords : array\n size of DxN or 3xAxN\n epoch : float\n total time step.\n index : slice obj; Default `np.s_[:]`\n Choose the steps want it to be returned. Default is all steps.\n ' p = (coords or self.coords.copy()) dt = self.dt ddt = (dt * dt) if (index == np.s_[:]): p = concatenate([p[(..., 0, nax)], p, p[(..., (- 1), nax)]], axis=(- 1)) return ((((2 * p[(..., 1:(- 1))]) - p[(..., :(- 2))]) - p[(..., 2:)]) / ddt) elif (index == np.s_[1:(- 1)]): return ((((2 * p[(..., 1:(- 1))]) - p[(..., :(- 2))]) - p[(..., 2:)]) / ddt) i = np.arange(N)[index] if (i[0] == 0): p = concatenate([p[(..., 0, nax)], p], axis=(- 1)) i += 1 if (i[(- 1)] == (N - 1)): p = concatenate([p, p[(..., (- 1), nax)]], axis=(- 1)) return ((((2 * p[(..., i)]) - p[(..., (i - 1))]) - p[(..., (i + 1))]) / ddt)<|docstring|>Return acceleration at each step Get Dx N ndarray, Returns 3xNxP - 1 array, use three point to get acceleration :math:`a[i] = (2x[i] - x[i+1] - x[i-1]) / dtdt` Parameters ---------- coords : array size of DxN or 3xAxN epoch : float total time step. index : slice obj; Default `np.s_[:]` Choose the steps want it to be returned. Default is all steps.<|endoftext|>
ce289fdd189fe63aa19d3e481264455309031c05cd42e1606705d5e7ef31e13b
def get_real_model_representation(self, index=np.s_[:]): '\n coords : D x P, in this case 2 x P\n returns : coords; 3 x N x P\n ' idx = np.arange(self.N)[index] coords = self.coords[(..., idx)] (phi, psi) = coords p = (self.reference.T[(..., np.newaxis)] * np.ones(len(coords.T))) positions = p.copy() positions[(:, :8)] = self.rotate(p, phi, v=(6, 8), mask=np.s_[:8]) positions[(:, 14:)] = self.rotate(p, psi, v=(14, 8), mask=np.s_[14:]) return self.overlap_handler(positions)
coords : D x P, in this case 2 x P returns : coords; 3 x N x P
taps/coords/cartesian.py
get_real_model_representation
schinavro/taps
0
python
def get_real_model_representation(self, index=np.s_[:]): '\n coords : D x P, in this case 2 x P\n returns : coords; 3 x N x P\n ' idx = np.arange(self.N)[index] coords = self.coords[(..., idx)] (phi, psi) = coords p = (self.reference.T[(..., np.newaxis)] * np.ones(len(coords.T))) positions = p.copy() positions[(:, :8)] = self.rotate(p, phi, v=(6, 8), mask=np.s_[:8]) positions[(:, 14:)] = self.rotate(p, psi, v=(14, 8), mask=np.s_[14:]) return self.overlap_handler(positions)
def get_real_model_representation(self, index=np.s_[:]): '\n coords : D x P, in this case 2 x P\n returns : coords; 3 x N x P\n ' idx = np.arange(self.N)[index] coords = self.coords[(..., idx)] (phi, psi) = coords p = (self.reference.T[(..., np.newaxis)] * np.ones(len(coords.T))) positions = p.copy() positions[(:, :8)] = self.rotate(p, phi, v=(6, 8), mask=np.s_[:8]) positions[(:, 14:)] = self.rotate(p, psi, v=(14, 8), mask=np.s_[14:]) return self.overlap_handler(positions)<|docstring|>coords : D x P, in this case 2 x P returns : coords; 3 x N x P<|endoftext|>
264b630debfccbe936bb765a98a265c821f10b60490c75f913a5ae5452dcf246
def projector(self, positions): '\n positions : 3 x N x P\n returns : coords; D x M x P, in this case 1 x 2 x P\n ' phi = self.get_dihedral(positions, 4, 6, 8, 14) psi = self.get_dihedral(positions, 6, 8, 14, 16) return np.vstack([phi, psi])[(np.newaxis, :)]
positions : 3 x N x P returns : coords; D x M x P, in this case 1 x 2 x P
taps/coords/cartesian.py
projector
schinavro/taps
0
python
def projector(self, positions): '\n positions : 3 x N x P\n returns : coords; D x M x P, in this case 1 x 2 x P\n ' phi = self.get_dihedral(positions, 4, 6, 8, 14) psi = self.get_dihedral(positions, 6, 8, 14, 16) return np.vstack([phi, psi])[(np.newaxis, :)]
def projector(self, positions): '\n positions : 3 x N x P\n returns : coords; D x M x P, in this case 1 x 2 x P\n ' phi = self.get_dihedral(positions, 4, 6, 8, 14) psi = self.get_dihedral(positions, 6, 8, 14, 16) return np.vstack([phi, psi])[(np.newaxis, :)]<|docstring|>positions : 3 x N x P returns : coords; D x M x P, in this case 1 x 2 x P<|endoftext|>
f69d4167d2997836f2591cb18a858497aae49aa7c976d585e4437c17cd050fc2
def draw_measurment_axis(draw, position, end, horizontal, ticks=25, bigger_ticks=5, tick_length=50, tick_width=2, labels=True): '\n\n :param draw: the draw object\n :param position: the other coordinate, orthogonal to the axis\n :param end: the position on the axis where the measurment should end\n :param horizontal: boolean, if in x direction. If false, than in y\n :param ticks: tick every x pixels\n :param bigger_ticks: bigger tick every x smaller ticks\n :param labels: boolean\n :return:\n ' ticks = list(range(0, (end + 1), ticks)) print(ticks) if horizontal: draw.line((0, position, end, position), fill='black', width=tick_width) else: draw.line((position, 0, position, end), fill='black', width=tick_width) for i in range(len(ticks)): width = (tick_width if ((i % bigger_ticks) != 0) else (tick_width * 2)) if horizontal: draw.line((ticks[i], (position - tick_length), ticks[i], (position + tick_length)), fill='black', width=width) else: draw.line(((position - tick_length), ticks[i], (position + tick_length), ticks[i]), fill='black', width=width) if ((i % bigger_ticks) == 0): if horizontal: draw.text((ticks[i], (position + (tick_length * ((- 2) if (((i // bigger_ticks) % 2) == 0) else 1)))), str(ticks[i]), fill='black', font=font) else: draw.text(((position + tick_length), ticks[i]), str(ticks[i]), fill='black', font=font)
:param draw: the draw object :param position: the other coordinate, orthogonal to the axis :param end: the position on the axis where the measurment should end :param horizontal: boolean, if in x direction. If false, than in y :param ticks: tick every x pixels :param bigger_ticks: bigger tick every x smaller ticks :param labels: boolean :return:
measurment_picture.py
draw_measurment_axis
quantenProjects/hexagon-photo-guides
0
python
def draw_measurment_axis(draw, position, end, horizontal, ticks=25, bigger_ticks=5, tick_length=50, tick_width=2, labels=True): '\n\n :param draw: the draw object\n :param position: the other coordinate, orthogonal to the axis\n :param end: the position on the axis where the measurment should end\n :param horizontal: boolean, if in x direction. If false, than in y\n :param ticks: tick every x pixels\n :param bigger_ticks: bigger tick every x smaller ticks\n :param labels: boolean\n :return:\n ' ticks = list(range(0, (end + 1), ticks)) print(ticks) if horizontal: draw.line((0, position, end, position), fill='black', width=tick_width) else: draw.line((position, 0, position, end), fill='black', width=tick_width) for i in range(len(ticks)): width = (tick_width if ((i % bigger_ticks) != 0) else (tick_width * 2)) if horizontal: draw.line((ticks[i], (position - tick_length), ticks[i], (position + tick_length)), fill='black', width=width) else: draw.line(((position - tick_length), ticks[i], (position + tick_length), ticks[i]), fill='black', width=width) if ((i % bigger_ticks) == 0): if horizontal: draw.text((ticks[i], (position + (tick_length * ((- 2) if (((i // bigger_ticks) % 2) == 0) else 1)))), str(ticks[i]), fill='black', font=font) else: draw.text(((position + tick_length), ticks[i]), str(ticks[i]), fill='black', font=font)
def draw_measurment_axis(draw, position, end, horizontal, ticks=25, bigger_ticks=5, tick_length=50, tick_width=2, labels=True): '\n\n :param draw: the draw object\n :param position: the other coordinate, orthogonal to the axis\n :param end: the position on the axis where the measurment should end\n :param horizontal: boolean, if in x direction. If false, than in y\n :param ticks: tick every x pixels\n :param bigger_ticks: bigger tick every x smaller ticks\n :param labels: boolean\n :return:\n ' ticks = list(range(0, (end + 1), ticks)) print(ticks) if horizontal: draw.line((0, position, end, position), fill='black', width=tick_width) else: draw.line((position, 0, position, end), fill='black', width=tick_width) for i in range(len(ticks)): width = (tick_width if ((i % bigger_ticks) != 0) else (tick_width * 2)) if horizontal: draw.line((ticks[i], (position - tick_length), ticks[i], (position + tick_length)), fill='black', width=width) else: draw.line(((position - tick_length), ticks[i], (position + tick_length), ticks[i]), fill='black', width=width) if ((i % bigger_ticks) == 0): if horizontal: draw.text((ticks[i], (position + (tick_length * ((- 2) if (((i // bigger_ticks) % 2) == 0) else 1)))), str(ticks[i]), fill='black', font=font) else: draw.text(((position + tick_length), ticks[i]), str(ticks[i]), fill='black', font=font)<|docstring|>:param draw: the draw object :param position: the other coordinate, orthogonal to the axis :param end: the position on the axis where the measurment should end :param horizontal: boolean, if in x direction. If false, than in y :param ticks: tick every x pixels :param bigger_ticks: bigger tick every x smaller ticks :param labels: boolean :return:<|endoftext|>
87a5118dbd00e2a79ef9c962b15672a9a0313773851d27569e71bfccae0ffbb7
def __init__(self, iter=[]): 'Intialize queue.' self.front = None self.back = None self._size = 0 try: for item in iter: self.enqueue(item) except TypeError: raise TypeError('Please pass an iterable.')
Intialize queue.
data_structures/queue/queue.py
__init__
austincmatteson/data-structures-and-algorithms
0
python
def __init__(self, iter=[]): self.front = None self.back = None self._size = 0 try: for item in iter: self.enqueue(item) except TypeError: raise TypeError('Please pass an iterable.')
def __init__(self, iter=[]): self.front = None self.back = None self._size = 0 try: for item in iter: self.enqueue(item) except TypeError: raise TypeError('Please pass an iterable.')<|docstring|>Intialize queue.<|endoftext|>
4ac255d40410a5e6a524b8c829637047a435096690c03791522a19d3cbdcaa45
def __str__(self): 'Return current front value.' return '<front> => {}\n<back> => {}'.format(self.front.val, self.back.val)
Return current front value.
data_structures/queue/queue.py
__str__
austincmatteson/data-structures-and-algorithms
0
python
def __str__(self): return '<front> => {}\n<back> => {}'.format(self.front.val, self.back.val)
def __str__(self): return '<front> => {}\n<back> => {}'.format(self.front.val, self.back.val)<|docstring|>Return current front value.<|endoftext|>
340782a0f65c71c67c4f51341394395c230a4749c6ed93d24b8d3adb41580d4e
def __len__(self): 'Return current stack length.' return self._size
Return current stack length.
data_structures/queue/queue.py
__len__
austincmatteson/data-structures-and-algorithms
0
python
def __len__(self): return self._size
def __len__(self): return self._size<|docstring|>Return current stack length.<|endoftext|>
063bfba8f623fad5e034255ea650daaeac7946c075a0bbab090d9e06de4e66c3
def enqueue(self, val): 'Push new value into back of queue.' eq = Node(val) if (not self.front): self.front = eq self.back = self.front self._size += 1 return self.front else: self.back._next = eq self.back = eq self._size += 1 return self.back
Push new value into back of queue.
data_structures/queue/queue.py
enqueue
austincmatteson/data-structures-and-algorithms
0
python
def enqueue(self, val): eq = Node(val) if (not self.front): self.front = eq self.back = self.front self._size += 1 return self.front else: self.back._next = eq self.back = eq self._size += 1 return self.back
def enqueue(self, val): eq = Node(val) if (not self.front): self.front = eq self.back = self.front self._size += 1 return self.front else: self.back._next = eq self.back = eq self._size += 1 return self.back<|docstring|>Push new value into back of queue.<|endoftext|>
912d96bcecdd4ccabacac3ee5b6c239ca79ee92d13b1e096678901039995b3f1
def dequeue(self): 'Pop value from front of queue.' if (self._size == 0): print('Queue is empty.') else: dq = self.front self.front = self.front._next self._size -= 1 return dq.val
Pop value from front of queue.
data_structures/queue/queue.py
dequeue
austincmatteson/data-structures-and-algorithms
0
python
def dequeue(self): if (self._size == 0): print('Queue is empty.') else: dq = self.front self.front = self.front._next self._size -= 1 return dq.val
def dequeue(self): if (self._size == 0): print('Queue is empty.') else: dq = self.front self.front = self.front._next self._size -= 1 return dq.val<|docstring|>Pop value from front of queue.<|endoftext|>
23f8afb471df72e2b2858c47a8765c0aef05c52a022bd11cb8c58d5b46f94fb3
def __init__(__self__, *, controller: pulumi.Input['IBMBlockCSISpecControllerArgs'], node: pulumi.Input['IBMBlockCSISpecNodeArgs'], image_pull_secrets: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None, sidecars: Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecSidecarsArgs']]]]=None): "\n IBMBlockCSISpec defines the desired state of IBMBlockCSI\n :param pulumi.Input['IBMBlockCSISpecControllerArgs'] controller: IBMBlockCSIControllerSpec defines the desired state of IBMBlockCSIController\n :param pulumi.Input['IBMBlockCSISpecNodeArgs'] node: IBMBlockCSINodeSpec defines the desired state of IBMBlockCSINode\n " pulumi.set(__self__, 'controller', controller) pulumi.set(__self__, 'node', node) if (image_pull_secrets is not None): pulumi.set(__self__, 'image_pull_secrets', image_pull_secrets) if (sidecars is not None): pulumi.set(__self__, 'sidecars', sidecars)
IBMBlockCSISpec defines the desired state of IBMBlockCSI :param pulumi.Input['IBMBlockCSISpecControllerArgs'] controller: IBMBlockCSIControllerSpec defines the desired state of IBMBlockCSIController :param pulumi.Input['IBMBlockCSISpecNodeArgs'] node: IBMBlockCSINodeSpec defines the desired state of IBMBlockCSINode
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
__init__
pulumi/pulumi-kubernetes-crds
0
python
def __init__(__self__, *, controller: pulumi.Input['IBMBlockCSISpecControllerArgs'], node: pulumi.Input['IBMBlockCSISpecNodeArgs'], image_pull_secrets: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None, sidecars: Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecSidecarsArgs']]]]=None): "\n IBMBlockCSISpec defines the desired state of IBMBlockCSI\n :param pulumi.Input['IBMBlockCSISpecControllerArgs'] controller: IBMBlockCSIControllerSpec defines the desired state of IBMBlockCSIController\n :param pulumi.Input['IBMBlockCSISpecNodeArgs'] node: IBMBlockCSINodeSpec defines the desired state of IBMBlockCSINode\n " pulumi.set(__self__, 'controller', controller) pulumi.set(__self__, 'node', node) if (image_pull_secrets is not None): pulumi.set(__self__, 'image_pull_secrets', image_pull_secrets) if (sidecars is not None): pulumi.set(__self__, 'sidecars', sidecars)
def __init__(__self__, *, controller: pulumi.Input['IBMBlockCSISpecControllerArgs'], node: pulumi.Input['IBMBlockCSISpecNodeArgs'], image_pull_secrets: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None, sidecars: Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecSidecarsArgs']]]]=None): "\n IBMBlockCSISpec defines the desired state of IBMBlockCSI\n :param pulumi.Input['IBMBlockCSISpecControllerArgs'] controller: IBMBlockCSIControllerSpec defines the desired state of IBMBlockCSIController\n :param pulumi.Input['IBMBlockCSISpecNodeArgs'] node: IBMBlockCSINodeSpec defines the desired state of IBMBlockCSINode\n " pulumi.set(__self__, 'controller', controller) pulumi.set(__self__, 'node', node) if (image_pull_secrets is not None): pulumi.set(__self__, 'image_pull_secrets', image_pull_secrets) if (sidecars is not None): pulumi.set(__self__, 'sidecars', sidecars)<|docstring|>IBMBlockCSISpec defines the desired state of IBMBlockCSI :param pulumi.Input['IBMBlockCSISpecControllerArgs'] controller: IBMBlockCSIControllerSpec defines the desired state of IBMBlockCSIController :param pulumi.Input['IBMBlockCSISpecNodeArgs'] node: IBMBlockCSINodeSpec defines the desired state of IBMBlockCSINode<|endoftext|>
da16afebb091aaa607c8bd248ed3307d5c59d28f75f2df4feac69548fe681378
@property @pulumi.getter def controller(self) -> pulumi.Input['IBMBlockCSISpecControllerArgs']: '\n IBMBlockCSIControllerSpec defines the desired state of IBMBlockCSIController\n ' return pulumi.get(self, 'controller')
IBMBlockCSIControllerSpec defines the desired state of IBMBlockCSIController
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
controller
pulumi/pulumi-kubernetes-crds
0
python
@property @pulumi.getter def controller(self) -> pulumi.Input['IBMBlockCSISpecControllerArgs']: '\n \n ' return pulumi.get(self, 'controller')
@property @pulumi.getter def controller(self) -> pulumi.Input['IBMBlockCSISpecControllerArgs']: '\n \n ' return pulumi.get(self, 'controller')<|docstring|>IBMBlockCSIControllerSpec defines the desired state of IBMBlockCSIController<|endoftext|>
fd2589932d6d7d6f6543a7f182fac876252654f319801771701ac98bbdc0f0b8
@property @pulumi.getter def node(self) -> pulumi.Input['IBMBlockCSISpecNodeArgs']: '\n IBMBlockCSINodeSpec defines the desired state of IBMBlockCSINode\n ' return pulumi.get(self, 'node')
IBMBlockCSINodeSpec defines the desired state of IBMBlockCSINode
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
node
pulumi/pulumi-kubernetes-crds
0
python
@property @pulumi.getter def node(self) -> pulumi.Input['IBMBlockCSISpecNodeArgs']: '\n \n ' return pulumi.get(self, 'node')
@property @pulumi.getter def node(self) -> pulumi.Input['IBMBlockCSISpecNodeArgs']: '\n \n ' return pulumi.get(self, 'node')<|docstring|>IBMBlockCSINodeSpec defines the desired state of IBMBlockCSINode<|endoftext|>
4c867c6915af0c058af8c230bc56081ab37a2ef3e2a72d198d1738a7c78fd866
def __init__(__self__, *, repository: pulumi.Input[str], tag: pulumi.Input[str], affinity: Optional[pulumi.Input['IBMBlockCSISpecControllerAffinityArgs']]=None, image_pull_policy: Optional[pulumi.Input[str]]=None, tolerations: Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerTolerationsArgs']]]]=None): "\n IBMBlockCSIControllerSpec defines the desired state of IBMBlockCSIController\n :param pulumi.Input['IBMBlockCSISpecControllerAffinityArgs'] affinity: Affinity is a group of affinity scheduling rules.\n :param pulumi.Input[str] image_pull_policy: PullPolicy describes a policy for if/when to pull a container image\n " pulumi.set(__self__, 'repository', repository) pulumi.set(__self__, 'tag', tag) if (affinity is not None): pulumi.set(__self__, 'affinity', affinity) if (image_pull_policy is not None): pulumi.set(__self__, 'image_pull_policy', image_pull_policy) if (tolerations is not None): pulumi.set(__self__, 'tolerations', tolerations)
IBMBlockCSIControllerSpec defines the desired state of IBMBlockCSIController :param pulumi.Input['IBMBlockCSISpecControllerAffinityArgs'] affinity: Affinity is a group of affinity scheduling rules. :param pulumi.Input[str] image_pull_policy: PullPolicy describes a policy for if/when to pull a container image
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
__init__
pulumi/pulumi-kubernetes-crds
0
python
def __init__(__self__, *, repository: pulumi.Input[str], tag: pulumi.Input[str], affinity: Optional[pulumi.Input['IBMBlockCSISpecControllerAffinityArgs']]=None, image_pull_policy: Optional[pulumi.Input[str]]=None, tolerations: Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerTolerationsArgs']]]]=None): "\n IBMBlockCSIControllerSpec defines the desired state of IBMBlockCSIController\n :param pulumi.Input['IBMBlockCSISpecControllerAffinityArgs'] affinity: Affinity is a group of affinity scheduling rules.\n :param pulumi.Input[str] image_pull_policy: PullPolicy describes a policy for if/when to pull a container image\n " pulumi.set(__self__, 'repository', repository) pulumi.set(__self__, 'tag', tag) if (affinity is not None): pulumi.set(__self__, 'affinity', affinity) if (image_pull_policy is not None): pulumi.set(__self__, 'image_pull_policy', image_pull_policy) if (tolerations is not None): pulumi.set(__self__, 'tolerations', tolerations)
def __init__(__self__, *, repository: pulumi.Input[str], tag: pulumi.Input[str], affinity: Optional[pulumi.Input['IBMBlockCSISpecControllerAffinityArgs']]=None, image_pull_policy: Optional[pulumi.Input[str]]=None, tolerations: Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerTolerationsArgs']]]]=None): "\n IBMBlockCSIControllerSpec defines the desired state of IBMBlockCSIController\n :param pulumi.Input['IBMBlockCSISpecControllerAffinityArgs'] affinity: Affinity is a group of affinity scheduling rules.\n :param pulumi.Input[str] image_pull_policy: PullPolicy describes a policy for if/when to pull a container image\n " pulumi.set(__self__, 'repository', repository) pulumi.set(__self__, 'tag', tag) if (affinity is not None): pulumi.set(__self__, 'affinity', affinity) if (image_pull_policy is not None): pulumi.set(__self__, 'image_pull_policy', image_pull_policy) if (tolerations is not None): pulumi.set(__self__, 'tolerations', tolerations)<|docstring|>IBMBlockCSIControllerSpec defines the desired state of IBMBlockCSIController :param pulumi.Input['IBMBlockCSISpecControllerAffinityArgs'] affinity: Affinity is a group of affinity scheduling rules. :param pulumi.Input[str] image_pull_policy: PullPolicy describes a policy for if/when to pull a container image<|endoftext|>
f438198f262b4f946c6a38e6022a2c80bb8f84d25f7b437e4fd666bfe2d7d768
@property @pulumi.getter def affinity(self) -> Optional[pulumi.Input['IBMBlockCSISpecControllerAffinityArgs']]: '\n Affinity is a group of affinity scheduling rules.\n ' return pulumi.get(self, 'affinity')
Affinity is a group of affinity scheduling rules.
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
affinity
pulumi/pulumi-kubernetes-crds
0
python
@property @pulumi.getter def affinity(self) -> Optional[pulumi.Input['IBMBlockCSISpecControllerAffinityArgs']]: '\n \n ' return pulumi.get(self, 'affinity')
@property @pulumi.getter def affinity(self) -> Optional[pulumi.Input['IBMBlockCSISpecControllerAffinityArgs']]: '\n \n ' return pulumi.get(self, 'affinity')<|docstring|>Affinity is a group of affinity scheduling rules.<|endoftext|>
eec3d8ad38fb7a2b6a5912c6049aff61bd330642ef6be829638386895c6d5dd6
@property @pulumi.getter(name='imagePullPolicy') def image_pull_policy(self) -> Optional[pulumi.Input[str]]: '\n PullPolicy describes a policy for if/when to pull a container image\n ' return pulumi.get(self, 'image_pull_policy')
PullPolicy describes a policy for if/when to pull a container image
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
image_pull_policy
pulumi/pulumi-kubernetes-crds
0
python
@property @pulumi.getter(name='imagePullPolicy') def image_pull_policy(self) -> Optional[pulumi.Input[str]]: '\n \n ' return pulumi.get(self, 'image_pull_policy')
@property @pulumi.getter(name='imagePullPolicy') def image_pull_policy(self) -> Optional[pulumi.Input[str]]: '\n \n ' return pulumi.get(self, 'image_pull_policy')<|docstring|>PullPolicy describes a policy for if/when to pull a container image<|endoftext|>
bc989dd76190ea79b280a89180ece295ae65700fb4a1fb43a98a441e5c8fb66f
def __init__(__self__, *, node_affinity: Optional[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityArgs']]=None, pod_affinity: Optional[pulumi.Input['IBMBlockCSISpecControllerAffinityPodAffinityArgs']]=None, pod_anti_affinity: Optional[pulumi.Input['IBMBlockCSISpecControllerAffinityPodAntiAffinityArgs']]=None): "\n Affinity is a group of affinity scheduling rules.\n :param pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityArgs'] node_affinity: Describes node affinity scheduling rules for the pod.\n :param pulumi.Input['IBMBlockCSISpecControllerAffinityPodAffinityArgs'] pod_affinity: Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).\n :param pulumi.Input['IBMBlockCSISpecControllerAffinityPodAntiAffinityArgs'] pod_anti_affinity: Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).\n " if (node_affinity is not None): pulumi.set(__self__, 'node_affinity', node_affinity) if (pod_affinity is not None): pulumi.set(__self__, 'pod_affinity', pod_affinity) if (pod_anti_affinity is not None): pulumi.set(__self__, 'pod_anti_affinity', pod_anti_affinity)
Affinity is a group of affinity scheduling rules. :param pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityArgs'] node_affinity: Describes node affinity scheduling rules for the pod. :param pulumi.Input['IBMBlockCSISpecControllerAffinityPodAffinityArgs'] pod_affinity: Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). :param pulumi.Input['IBMBlockCSISpecControllerAffinityPodAntiAffinityArgs'] pod_anti_affinity: Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
__init__
pulumi/pulumi-kubernetes-crds
0
python
def __init__(__self__, *, node_affinity: Optional[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityArgs']]=None, pod_affinity: Optional[pulumi.Input['IBMBlockCSISpecControllerAffinityPodAffinityArgs']]=None, pod_anti_affinity: Optional[pulumi.Input['IBMBlockCSISpecControllerAffinityPodAntiAffinityArgs']]=None): "\n Affinity is a group of affinity scheduling rules.\n :param pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityArgs'] node_affinity: Describes node affinity scheduling rules for the pod.\n :param pulumi.Input['IBMBlockCSISpecControllerAffinityPodAffinityArgs'] pod_affinity: Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).\n :param pulumi.Input['IBMBlockCSISpecControllerAffinityPodAntiAffinityArgs'] pod_anti_affinity: Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).\n " if (node_affinity is not None): pulumi.set(__self__, 'node_affinity', node_affinity) if (pod_affinity is not None): pulumi.set(__self__, 'pod_affinity', pod_affinity) if (pod_anti_affinity is not None): pulumi.set(__self__, 'pod_anti_affinity', pod_anti_affinity)
def __init__(__self__, *, node_affinity: Optional[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityArgs']]=None, pod_affinity: Optional[pulumi.Input['IBMBlockCSISpecControllerAffinityPodAffinityArgs']]=None, pod_anti_affinity: Optional[pulumi.Input['IBMBlockCSISpecControllerAffinityPodAntiAffinityArgs']]=None): "\n Affinity is a group of affinity scheduling rules.\n :param pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityArgs'] node_affinity: Describes node affinity scheduling rules for the pod.\n :param pulumi.Input['IBMBlockCSISpecControllerAffinityPodAffinityArgs'] pod_affinity: Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).\n :param pulumi.Input['IBMBlockCSISpecControllerAffinityPodAntiAffinityArgs'] pod_anti_affinity: Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).\n " if (node_affinity is not None): pulumi.set(__self__, 'node_affinity', node_affinity) if (pod_affinity is not None): pulumi.set(__self__, 'pod_affinity', pod_affinity) if (pod_anti_affinity is not None): pulumi.set(__self__, 'pod_anti_affinity', pod_anti_affinity)<|docstring|>Affinity is a group of affinity scheduling rules. :param pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityArgs'] node_affinity: Describes node affinity scheduling rules for the pod. :param pulumi.Input['IBMBlockCSISpecControllerAffinityPodAffinityArgs'] pod_affinity: Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). :param pulumi.Input['IBMBlockCSISpecControllerAffinityPodAntiAffinityArgs'] pod_anti_affinity: Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).<|endoftext|>
58f40bc6ee84353e5a52e4c0d5846b9e03cf3ac8c988d620b0aed997c429b95a
@property @pulumi.getter(name='nodeAffinity') def node_affinity(self) -> Optional[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityArgs']]: '\n Describes node affinity scheduling rules for the pod.\n ' return pulumi.get(self, 'node_affinity')
Describes node affinity scheduling rules for the pod.
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
node_affinity
pulumi/pulumi-kubernetes-crds
0
python
@property @pulumi.getter(name='nodeAffinity') def node_affinity(self) -> Optional[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityArgs']]: '\n \n ' return pulumi.get(self, 'node_affinity')
@property @pulumi.getter(name='nodeAffinity') def node_affinity(self) -> Optional[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityArgs']]: '\n \n ' return pulumi.get(self, 'node_affinity')<|docstring|>Describes node affinity scheduling rules for the pod.<|endoftext|>
305ec00792a5099c88308040512eac608590e17584b382c51f9a7616326d1124
@property @pulumi.getter(name='podAffinity') def pod_affinity(self) -> Optional[pulumi.Input['IBMBlockCSISpecControllerAffinityPodAffinityArgs']]: '\n Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).\n ' return pulumi.get(self, 'pod_affinity')
Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
pod_affinity
pulumi/pulumi-kubernetes-crds
0
python
@property @pulumi.getter(name='podAffinity') def pod_affinity(self) -> Optional[pulumi.Input['IBMBlockCSISpecControllerAffinityPodAffinityArgs']]: '\n \n ' return pulumi.get(self, 'pod_affinity')
@property @pulumi.getter(name='podAffinity') def pod_affinity(self) -> Optional[pulumi.Input['IBMBlockCSISpecControllerAffinityPodAffinityArgs']]: '\n \n ' return pulumi.get(self, 'pod_affinity')<|docstring|>Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).<|endoftext|>
c8ef769ae6cc7819c6418ecd53a17a14b6d4fe922b81b4d552aba73cbf4384be
@property @pulumi.getter(name='podAntiAffinity') def pod_anti_affinity(self) -> Optional[pulumi.Input['IBMBlockCSISpecControllerAffinityPodAntiAffinityArgs']]: '\n Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).\n ' return pulumi.get(self, 'pod_anti_affinity')
Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
pod_anti_affinity
pulumi/pulumi-kubernetes-crds
0
python
@property @pulumi.getter(name='podAntiAffinity') def pod_anti_affinity(self) -> Optional[pulumi.Input['IBMBlockCSISpecControllerAffinityPodAntiAffinityArgs']]: '\n \n ' return pulumi.get(self, 'pod_anti_affinity')
@property @pulumi.getter(name='podAntiAffinity') def pod_anti_affinity(self) -> Optional[pulumi.Input['IBMBlockCSISpecControllerAffinityPodAntiAffinityArgs']]: '\n \n ' return pulumi.get(self, 'pod_anti_affinity')<|docstring|>Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).<|endoftext|>
756d7c6aecf0cf51c9ad273757e16c607996b34eb796221a822d1301612f332b
def __init__(__self__, *, preferred_during_scheduling_ignored_during_execution: Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionArgs']]]]=None, required_during_scheduling_ignored_during_execution: Optional[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionArgs']]=None): '\n Describes node affinity scheduling rules for the pod.\n :param pulumi.Input[Sequence[pulumi.Input[\'IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionArgs\']]] preferred_during_scheduling_ignored_during_execution: The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred.\n :param pulumi.Input[\'IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionArgs\'] required_during_scheduling_ignored_during_execution: If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.\n ' if (preferred_during_scheduling_ignored_during_execution is not None): pulumi.set(__self__, 'preferred_during_scheduling_ignored_during_execution', preferred_during_scheduling_ignored_during_execution) if (required_during_scheduling_ignored_during_execution is not None): pulumi.set(__self__, 'required_during_scheduling_ignored_during_execution', required_during_scheduling_ignored_during_execution)
Describes node affinity scheduling rules for the pod. :param pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionArgs']]] preferred_during_scheduling_ignored_during_execution: The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. :param pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionArgs'] required_during_scheduling_ignored_during_execution: If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
__init__
pulumi/pulumi-kubernetes-crds
0
python
def __init__(__self__, *, preferred_during_scheduling_ignored_during_execution: Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionArgs']]]]=None, required_during_scheduling_ignored_during_execution: Optional[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionArgs']]=None): '\n Describes node affinity scheduling rules for the pod.\n :param pulumi.Input[Sequence[pulumi.Input[\'IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionArgs\']]] preferred_during_scheduling_ignored_during_execution: The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred.\n :param pulumi.Input[\'IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionArgs\'] required_during_scheduling_ignored_during_execution: If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.\n ' if (preferred_during_scheduling_ignored_during_execution is not None): pulumi.set(__self__, 'preferred_during_scheduling_ignored_during_execution', preferred_during_scheduling_ignored_during_execution) if (required_during_scheduling_ignored_during_execution is not None): pulumi.set(__self__, 'required_during_scheduling_ignored_during_execution', required_during_scheduling_ignored_during_execution)
def __init__(__self__, *, preferred_during_scheduling_ignored_during_execution: Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionArgs']]]]=None, required_during_scheduling_ignored_during_execution: Optional[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionArgs']]=None): '\n Describes node affinity scheduling rules for the pod.\n :param pulumi.Input[Sequence[pulumi.Input[\'IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionArgs\']]] preferred_during_scheduling_ignored_during_execution: The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred.\n :param pulumi.Input[\'IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionArgs\'] required_during_scheduling_ignored_during_execution: If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.\n ' if (preferred_during_scheduling_ignored_during_execution is not None): pulumi.set(__self__, 'preferred_during_scheduling_ignored_during_execution', preferred_during_scheduling_ignored_during_execution) if (required_during_scheduling_ignored_during_execution is not None): pulumi.set(__self__, 'required_during_scheduling_ignored_during_execution', required_during_scheduling_ignored_during_execution)<|docstring|>Describes node affinity scheduling rules for the pod. :param pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionArgs']]] preferred_during_scheduling_ignored_during_execution: The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. :param pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionArgs'] required_during_scheduling_ignored_during_execution: If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.<|endoftext|>
02d00adcb82a25de3bd9c899c35d8e3fb12a12c7ba8e56e00514b9c142b038c6
@property @pulumi.getter(name='preferredDuringSchedulingIgnoredDuringExecution') def preferred_during_scheduling_ignored_during_execution(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionArgs']]]]: '\n The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred.\n ' return pulumi.get(self, 'preferred_during_scheduling_ignored_during_execution')
The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred.
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
preferred_during_scheduling_ignored_during_execution
pulumi/pulumi-kubernetes-crds
0
python
@property @pulumi.getter(name='preferredDuringSchedulingIgnoredDuringExecution') def preferred_during_scheduling_ignored_during_execution(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionArgs']]]]: '\n \n ' return pulumi.get(self, 'preferred_during_scheduling_ignored_during_execution')
@property @pulumi.getter(name='preferredDuringSchedulingIgnoredDuringExecution') def preferred_during_scheduling_ignored_during_execution(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionArgs']]]]: '\n \n ' return pulumi.get(self, 'preferred_during_scheduling_ignored_during_execution')<|docstring|>The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred.<|endoftext|>
1d4fdcb0ad2445665a75f42163f43086ed8154dc0350c824aa7de0caab76ca35
@property @pulumi.getter(name='requiredDuringSchedulingIgnoredDuringExecution') def required_during_scheduling_ignored_during_execution(self) -> Optional[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionArgs']]: '\n If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.\n ' return pulumi.get(self, 'required_during_scheduling_ignored_during_execution')
If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
required_during_scheduling_ignored_during_execution
pulumi/pulumi-kubernetes-crds
0
python
@property @pulumi.getter(name='requiredDuringSchedulingIgnoredDuringExecution') def required_during_scheduling_ignored_during_execution(self) -> Optional[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionArgs']]: '\n \n ' return pulumi.get(self, 'required_during_scheduling_ignored_during_execution')
@property @pulumi.getter(name='requiredDuringSchedulingIgnoredDuringExecution') def required_during_scheduling_ignored_during_execution(self) -> Optional[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionArgs']]: '\n \n ' return pulumi.get(self, 'required_during_scheduling_ignored_during_execution')<|docstring|>If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.<|endoftext|>
da76ea17cff7627e32de4736eb3a3a994f33d1ef2e92a3e028ba95642b0e1cee
def __init__(__self__, *, preference: pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceArgs'], weight: pulumi.Input[int]): "\n An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).\n :param pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceArgs'] preference: A node selector term, associated with the corresponding weight.\n :param pulumi.Input[int] weight: Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.\n " pulumi.set(__self__, 'preference', preference) pulumi.set(__self__, 'weight', weight)
An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). :param pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceArgs'] preference: A node selector term, associated with the corresponding weight. :param pulumi.Input[int] weight: Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
__init__
pulumi/pulumi-kubernetes-crds
0
python
def __init__(__self__, *, preference: pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceArgs'], weight: pulumi.Input[int]): "\n An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).\n :param pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceArgs'] preference: A node selector term, associated with the corresponding weight.\n :param pulumi.Input[int] weight: Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.\n " pulumi.set(__self__, 'preference', preference) pulumi.set(__self__, 'weight', weight)
def __init__(__self__, *, preference: pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceArgs'], weight: pulumi.Input[int]): "\n An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).\n :param pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceArgs'] preference: A node selector term, associated with the corresponding weight.\n :param pulumi.Input[int] weight: Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.\n " pulumi.set(__self__, 'preference', preference) pulumi.set(__self__, 'weight', weight)<|docstring|>An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). :param pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceArgs'] preference: A node selector term, associated with the corresponding weight. :param pulumi.Input[int] weight: Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.<|endoftext|>
32a0003be8b6d7a8dc62271419503330b24671df6f191b0882ed000e8ff1e35a
@property @pulumi.getter def preference(self) -> pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceArgs']: '\n A node selector term, associated with the corresponding weight.\n ' return pulumi.get(self, 'preference')
A node selector term, associated with the corresponding weight.
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
preference
pulumi/pulumi-kubernetes-crds
0
python
@property @pulumi.getter def preference(self) -> pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceArgs']: '\n \n ' return pulumi.get(self, 'preference')
@property @pulumi.getter def preference(self) -> pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceArgs']: '\n \n ' return pulumi.get(self, 'preference')<|docstring|>A node selector term, associated with the corresponding weight.<|endoftext|>
68c1b973384e8ecfa9b5c47d4dc3186fa5244e1bb3a3957577ed52cc37586925
@property @pulumi.getter def weight(self) -> pulumi.Input[int]: '\n Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.\n ' return pulumi.get(self, 'weight')
Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
weight
pulumi/pulumi-kubernetes-crds
0
python
@property @pulumi.getter def weight(self) -> pulumi.Input[int]: '\n \n ' return pulumi.get(self, 'weight')
@property @pulumi.getter def weight(self) -> pulumi.Input[int]: '\n \n ' return pulumi.get(self, 'weight')<|docstring|>Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.<|endoftext|>
bec096d683d057ae53768da74ca5cfc0f6a5aea368b61d5235a3229828dab655
def __init__(__self__, *, match_expressions: Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchExpressionsArgs']]]]=None, match_fields: Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchFieldsArgs']]]]=None): "\n A node selector term, associated with the corresponding weight.\n :param pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchExpressionsArgs']]] match_expressions: A list of node selector requirements by node's labels.\n :param pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchFieldsArgs']]] match_fields: A list of node selector requirements by node's fields.\n " if (match_expressions is not None): pulumi.set(__self__, 'match_expressions', match_expressions) if (match_fields is not None): pulumi.set(__self__, 'match_fields', match_fields)
A node selector term, associated with the corresponding weight. :param pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchExpressionsArgs']]] match_expressions: A list of node selector requirements by node's labels. :param pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchFieldsArgs']]] match_fields: A list of node selector requirements by node's fields.
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
__init__
pulumi/pulumi-kubernetes-crds
0
python
def __init__(__self__, *, match_expressions: Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchExpressionsArgs']]]]=None, match_fields: Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchFieldsArgs']]]]=None): "\n A node selector term, associated with the corresponding weight.\n :param pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchExpressionsArgs']]] match_expressions: A list of node selector requirements by node's labels.\n :param pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchFieldsArgs']]] match_fields: A list of node selector requirements by node's fields.\n " if (match_expressions is not None): pulumi.set(__self__, 'match_expressions', match_expressions) if (match_fields is not None): pulumi.set(__self__, 'match_fields', match_fields)
def __init__(__self__, *, match_expressions: Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchExpressionsArgs']]]]=None, match_fields: Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchFieldsArgs']]]]=None): "\n A node selector term, associated with the corresponding weight.\n :param pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchExpressionsArgs']]] match_expressions: A list of node selector requirements by node's labels.\n :param pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchFieldsArgs']]] match_fields: A list of node selector requirements by node's fields.\n " if (match_expressions is not None): pulumi.set(__self__, 'match_expressions', match_expressions) if (match_fields is not None): pulumi.set(__self__, 'match_fields', match_fields)<|docstring|>A node selector term, associated with the corresponding weight. :param pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchExpressionsArgs']]] match_expressions: A list of node selector requirements by node's labels. :param pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchFieldsArgs']]] match_fields: A list of node selector requirements by node's fields.<|endoftext|>
67dd271767dd1ecafd957c3e1fec4ea13950e2f7b265ce664f0008b12927b0b1
@property @pulumi.getter(name='matchExpressions') def match_expressions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchExpressionsArgs']]]]: "\n A list of node selector requirements by node's labels.\n " return pulumi.get(self, 'match_expressions')
A list of node selector requirements by node's labels.
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
match_expressions
pulumi/pulumi-kubernetes-crds
0
python
@property @pulumi.getter(name='matchExpressions') def match_expressions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchExpressionsArgs']]]]: "\n \n " return pulumi.get(self, 'match_expressions')
@property @pulumi.getter(name='matchExpressions') def match_expressions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchExpressionsArgs']]]]: "\n \n " return pulumi.get(self, 'match_expressions')<|docstring|>A list of node selector requirements by node's labels.<|endoftext|>
403ec89e16d74562a7bfaf98a7fd99b12738555ed870bc6f2191802a764dc0d7
@property @pulumi.getter(name='matchFields') def match_fields(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchFieldsArgs']]]]: "\n A list of node selector requirements by node's fields.\n " return pulumi.get(self, 'match_fields')
A list of node selector requirements by node's fields.
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
match_fields
pulumi/pulumi-kubernetes-crds
0
python
@property @pulumi.getter(name='matchFields') def match_fields(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchFieldsArgs']]]]: "\n \n " return pulumi.get(self, 'match_fields')
@property @pulumi.getter(name='matchFields') def match_fields(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchFieldsArgs']]]]: "\n \n " return pulumi.get(self, 'match_fields')<|docstring|>A list of node selector requirements by node's fields.<|endoftext|>
bf5e44d0e580083b08c3f5d19b06e03c46a981848dd902f10b7e1e615be95e67
def __init__(__self__, *, key: pulumi.Input[str], operator: pulumi.Input[str], values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None): "\n A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.\n :param pulumi.Input[str] key: The label key that the selector applies to.\n :param pulumi.Input[str] operator: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.\n :param pulumi.Input[Sequence[pulumi.Input[str]]] values: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.\n " pulumi.set(__self__, 'key', key) pulumi.set(__self__, 'operator', operator) if (values is not None): pulumi.set(__self__, 'values', values)
A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. :param pulumi.Input[str] key: The label key that the selector applies to. :param pulumi.Input[str] operator: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
__init__
pulumi/pulumi-kubernetes-crds
0
python
def __init__(__self__, *, key: pulumi.Input[str], operator: pulumi.Input[str], values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None): "\n A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.\n :param pulumi.Input[str] key: The label key that the selector applies to.\n :param pulumi.Input[str] operator: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.\n :param pulumi.Input[Sequence[pulumi.Input[str]]] values: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.\n " pulumi.set(__self__, 'key', key) pulumi.set(__self__, 'operator', operator) if (values is not None): pulumi.set(__self__, 'values', values)
def __init__(__self__, *, key: pulumi.Input[str], operator: pulumi.Input[str], values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None): "\n A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.\n :param pulumi.Input[str] key: The label key that the selector applies to.\n :param pulumi.Input[str] operator: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.\n :param pulumi.Input[Sequence[pulumi.Input[str]]] values: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.\n " pulumi.set(__self__, 'key', key) pulumi.set(__self__, 'operator', operator) if (values is not None): pulumi.set(__self__, 'values', values)<|docstring|>A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. :param pulumi.Input[str] key: The label key that the selector applies to. :param pulumi.Input[str] operator: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.<|endoftext|>
6cf7c8938f7ceca38c2736fba43ed8ef4a46a14b2f0c1c1a3e2847900d0ba1cc
@property @pulumi.getter def key(self) -> pulumi.Input[str]: '\n The label key that the selector applies to.\n ' return pulumi.get(self, 'key')
The label key that the selector applies to.
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
key
pulumi/pulumi-kubernetes-crds
0
python
@property @pulumi.getter def key(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'key')
@property @pulumi.getter def key(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'key')<|docstring|>The label key that the selector applies to.<|endoftext|>
026834ef706ec81b0dac6449994d81a644e4e6273652b199546c01310ae542ba
@property @pulumi.getter def operator(self) -> pulumi.Input[str]: "\n Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.\n " return pulumi.get(self, 'operator')
Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
operator
pulumi/pulumi-kubernetes-crds
0
python
@property @pulumi.getter def operator(self) -> pulumi.Input[str]: "\n \n " return pulumi.get(self, 'operator')
@property @pulumi.getter def operator(self) -> pulumi.Input[str]: "\n \n " return pulumi.get(self, 'operator')<|docstring|>Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.<|endoftext|>
1156c9e0af0cbb14c25f97914f22f3802e172355689d41403da88d3ce78227b5
@property @pulumi.getter def values(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: '\n An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.\n ' return pulumi.get(self, 'values')
An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
values
pulumi/pulumi-kubernetes-crds
0
python
@property @pulumi.getter def values(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: '\n \n ' return pulumi.get(self, 'values')
@property @pulumi.getter def values(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: '\n \n ' return pulumi.get(self, 'values')<|docstring|>An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.<|endoftext|>
bf5e44d0e580083b08c3f5d19b06e03c46a981848dd902f10b7e1e615be95e67
def __init__(__self__, *, key: pulumi.Input[str], operator: pulumi.Input[str], values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None): "\n A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.\n :param pulumi.Input[str] key: The label key that the selector applies to.\n :param pulumi.Input[str] operator: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.\n :param pulumi.Input[Sequence[pulumi.Input[str]]] values: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.\n " pulumi.set(__self__, 'key', key) pulumi.set(__self__, 'operator', operator) if (values is not None): pulumi.set(__self__, 'values', values)
A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. :param pulumi.Input[str] key: The label key that the selector applies to. :param pulumi.Input[str] operator: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
__init__
pulumi/pulumi-kubernetes-crds
0
python
def __init__(__self__, *, key: pulumi.Input[str], operator: pulumi.Input[str], values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None): "\n A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.\n :param pulumi.Input[str] key: The label key that the selector applies to.\n :param pulumi.Input[str] operator: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.\n :param pulumi.Input[Sequence[pulumi.Input[str]]] values: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.\n " pulumi.set(__self__, 'key', key) pulumi.set(__self__, 'operator', operator) if (values is not None): pulumi.set(__self__, 'values', values)
def __init__(__self__, *, key: pulumi.Input[str], operator: pulumi.Input[str], values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None): "\n A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.\n :param pulumi.Input[str] key: The label key that the selector applies to.\n :param pulumi.Input[str] operator: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.\n :param pulumi.Input[Sequence[pulumi.Input[str]]] values: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.\n " pulumi.set(__self__, 'key', key) pulumi.set(__self__, 'operator', operator) if (values is not None): pulumi.set(__self__, 'values', values)<|docstring|>A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. :param pulumi.Input[str] key: The label key that the selector applies to. :param pulumi.Input[str] operator: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.<|endoftext|>
6cf7c8938f7ceca38c2736fba43ed8ef4a46a14b2f0c1c1a3e2847900d0ba1cc
@property @pulumi.getter def key(self) -> pulumi.Input[str]: '\n The label key that the selector applies to.\n ' return pulumi.get(self, 'key')
The label key that the selector applies to.
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
key
pulumi/pulumi-kubernetes-crds
0
python
@property @pulumi.getter def key(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'key')
@property @pulumi.getter def key(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'key')<|docstring|>The label key that the selector applies to.<|endoftext|>
026834ef706ec81b0dac6449994d81a644e4e6273652b199546c01310ae542ba
@property @pulumi.getter def operator(self) -> pulumi.Input[str]: "\n Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.\n " return pulumi.get(self, 'operator')
Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
operator
pulumi/pulumi-kubernetes-crds
0
python
@property @pulumi.getter def operator(self) -> pulumi.Input[str]: "\n \n " return pulumi.get(self, 'operator')
@property @pulumi.getter def operator(self) -> pulumi.Input[str]: "\n \n " return pulumi.get(self, 'operator')<|docstring|>Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.<|endoftext|>
1156c9e0af0cbb14c25f97914f22f3802e172355689d41403da88d3ce78227b5
@property @pulumi.getter def values(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: '\n An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.\n ' return pulumi.get(self, 'values')
An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
values
pulumi/pulumi-kubernetes-crds
0
python
@property @pulumi.getter def values(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: '\n \n ' return pulumi.get(self, 'values')
@property @pulumi.getter def values(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: '\n \n ' return pulumi.get(self, 'values')<|docstring|>An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.<|endoftext|>
f4f720c4013a456f1e3b7d9e1185025a80dcb4a3d3398463b2520e5f62d7c188
def __init__(__self__, *, node_selector_terms: pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsArgs']]]): "\n If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.\n :param pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsArgs']]] node_selector_terms: Required. A list of node selector terms. The terms are ORed.\n " pulumi.set(__self__, 'node_selector_terms', node_selector_terms)
If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. :param pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsArgs']]] node_selector_terms: Required. A list of node selector terms. The terms are ORed.
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
__init__
pulumi/pulumi-kubernetes-crds
0
python
def __init__(__self__, *, node_selector_terms: pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsArgs']]]): "\n If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.\n :param pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsArgs']]] node_selector_terms: Required. A list of node selector terms. The terms are ORed.\n " pulumi.set(__self__, 'node_selector_terms', node_selector_terms)
def __init__(__self__, *, node_selector_terms: pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsArgs']]]): "\n If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.\n :param pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsArgs']]] node_selector_terms: Required. A list of node selector terms. The terms are ORed.\n " pulumi.set(__self__, 'node_selector_terms', node_selector_terms)<|docstring|>If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. :param pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsArgs']]] node_selector_terms: Required. A list of node selector terms. The terms are ORed.<|endoftext|>
10e6ea5659308d3b0ba619c999e8abd138f9d3a0847e4e5ab7e4d9fe87cd4140
@property @pulumi.getter(name='nodeSelectorTerms') def node_selector_terms(self) -> pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsArgs']]]: '\n Required. A list of node selector terms. The terms are ORed.\n ' return pulumi.get(self, 'node_selector_terms')
Required. A list of node selector terms. The terms are ORed.
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
node_selector_terms
pulumi/pulumi-kubernetes-crds
0
python
@property @pulumi.getter(name='nodeSelectorTerms') def node_selector_terms(self) -> pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsArgs']]]: '\n \n ' return pulumi.get(self, 'node_selector_terms')
@property @pulumi.getter(name='nodeSelectorTerms') def node_selector_terms(self) -> pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsArgs']]]: '\n \n ' return pulumi.get(self, 'node_selector_terms')<|docstring|>Required. A list of node selector terms. The terms are ORed.<|endoftext|>
4386660a0f49e975735703fd6ef0053bcc25e56149e1e0f86c406f2962a619e6
def __init__(__self__, *, match_expressions: Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchExpressionsArgs']]]]=None, match_fields: Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchFieldsArgs']]]]=None): "\n A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.\n :param pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchExpressionsArgs']]] match_expressions: A list of node selector requirements by node's labels.\n :param pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchFieldsArgs']]] match_fields: A list of node selector requirements by node's fields.\n " if (match_expressions is not None): pulumi.set(__self__, 'match_expressions', match_expressions) if (match_fields is not None): pulumi.set(__self__, 'match_fields', match_fields)
A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. :param pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchExpressionsArgs']]] match_expressions: A list of node selector requirements by node's labels. :param pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchFieldsArgs']]] match_fields: A list of node selector requirements by node's fields.
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
__init__
pulumi/pulumi-kubernetes-crds
0
python
def __init__(__self__, *, match_expressions: Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchExpressionsArgs']]]]=None, match_fields: Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchFieldsArgs']]]]=None): "\n A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.\n :param pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchExpressionsArgs']]] match_expressions: A list of node selector requirements by node's labels.\n :param pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchFieldsArgs']]] match_fields: A list of node selector requirements by node's fields.\n " if (match_expressions is not None): pulumi.set(__self__, 'match_expressions', match_expressions) if (match_fields is not None): pulumi.set(__self__, 'match_fields', match_fields)
def __init__(__self__, *, match_expressions: Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchExpressionsArgs']]]]=None, match_fields: Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchFieldsArgs']]]]=None): "\n A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.\n :param pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchExpressionsArgs']]] match_expressions: A list of node selector requirements by node's labels.\n :param pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchFieldsArgs']]] match_fields: A list of node selector requirements by node's fields.\n " if (match_expressions is not None): pulumi.set(__self__, 'match_expressions', match_expressions) if (match_fields is not None): pulumi.set(__self__, 'match_fields', match_fields)<|docstring|>A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. :param pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchExpressionsArgs']]] match_expressions: A list of node selector requirements by node's labels. :param pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchFieldsArgs']]] match_fields: A list of node selector requirements by node's fields.<|endoftext|>
e6d2a6f2d00c4dff824340835fed00d1cc71f0694d950b8046c57ca609447754
@property @pulumi.getter(name='matchExpressions') def match_expressions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchExpressionsArgs']]]]: "\n A list of node selector requirements by node's labels.\n " return pulumi.get(self, 'match_expressions')
A list of node selector requirements by node's labels.
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
match_expressions
pulumi/pulumi-kubernetes-crds
0
python
@property @pulumi.getter(name='matchExpressions') def match_expressions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchExpressionsArgs']]]]: "\n \n " return pulumi.get(self, 'match_expressions')
@property @pulumi.getter(name='matchExpressions') def match_expressions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchExpressionsArgs']]]]: "\n \n " return pulumi.get(self, 'match_expressions')<|docstring|>A list of node selector requirements by node's labels.<|endoftext|>
68029483ab64d36b64b9255fcc38dfa3bf8993699838b8cc1677b8e7a48cb714
@property @pulumi.getter(name='matchFields') def match_fields(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchFieldsArgs']]]]: "\n A list of node selector requirements by node's fields.\n " return pulumi.get(self, 'match_fields')
A list of node selector requirements by node's fields.
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
match_fields
pulumi/pulumi-kubernetes-crds
0
python
@property @pulumi.getter(name='matchFields') def match_fields(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchFieldsArgs']]]]: "\n \n " return pulumi.get(self, 'match_fields')
@property @pulumi.getter(name='matchFields') def match_fields(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['IBMBlockCSISpecControllerAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchFieldsArgs']]]]: "\n \n " return pulumi.get(self, 'match_fields')<|docstring|>A list of node selector requirements by node's fields.<|endoftext|>
bf5e44d0e580083b08c3f5d19b06e03c46a981848dd902f10b7e1e615be95e67
def __init__(__self__, *, key: pulumi.Input[str], operator: pulumi.Input[str], values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None): "\n A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.\n :param pulumi.Input[str] key: The label key that the selector applies to.\n :param pulumi.Input[str] operator: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.\n :param pulumi.Input[Sequence[pulumi.Input[str]]] values: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.\n " pulumi.set(__self__, 'key', key) pulumi.set(__self__, 'operator', operator) if (values is not None): pulumi.set(__self__, 'values', values)
A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. :param pulumi.Input[str] key: The label key that the selector applies to. :param pulumi.Input[str] operator: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
__init__
pulumi/pulumi-kubernetes-crds
0
python
def __init__(__self__, *, key: pulumi.Input[str], operator: pulumi.Input[str], values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None): "\n A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.\n :param pulumi.Input[str] key: The label key that the selector applies to.\n :param pulumi.Input[str] operator: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.\n :param pulumi.Input[Sequence[pulumi.Input[str]]] values: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.\n " pulumi.set(__self__, 'key', key) pulumi.set(__self__, 'operator', operator) if (values is not None): pulumi.set(__self__, 'values', values)
def __init__(__self__, *, key: pulumi.Input[str], operator: pulumi.Input[str], values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None): "\n A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.\n :param pulumi.Input[str] key: The label key that the selector applies to.\n :param pulumi.Input[str] operator: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.\n :param pulumi.Input[Sequence[pulumi.Input[str]]] values: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.\n " pulumi.set(__self__, 'key', key) pulumi.set(__self__, 'operator', operator) if (values is not None): pulumi.set(__self__, 'values', values)<|docstring|>A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. :param pulumi.Input[str] key: The label key that the selector applies to. :param pulumi.Input[str] operator: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.<|endoftext|>
6cf7c8938f7ceca38c2736fba43ed8ef4a46a14b2f0c1c1a3e2847900d0ba1cc
@property @pulumi.getter def key(self) -> pulumi.Input[str]: '\n The label key that the selector applies to.\n ' return pulumi.get(self, 'key')
The label key that the selector applies to.
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
key
pulumi/pulumi-kubernetes-crds
0
python
@property @pulumi.getter def key(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'key')
@property @pulumi.getter def key(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'key')<|docstring|>The label key that the selector applies to.<|endoftext|>
026834ef706ec81b0dac6449994d81a644e4e6273652b199546c01310ae542ba
@property @pulumi.getter def operator(self) -> pulumi.Input[str]: "\n Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.\n " return pulumi.get(self, 'operator')
Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
operator
pulumi/pulumi-kubernetes-crds
0
python
@property @pulumi.getter def operator(self) -> pulumi.Input[str]: "\n \n " return pulumi.get(self, 'operator')
@property @pulumi.getter def operator(self) -> pulumi.Input[str]: "\n \n " return pulumi.get(self, 'operator')<|docstring|>Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.<|endoftext|>
1156c9e0af0cbb14c25f97914f22f3802e172355689d41403da88d3ce78227b5
@property @pulumi.getter def values(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: '\n An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.\n ' return pulumi.get(self, 'values')
An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.
operators/ibm-block-csi-operator-community/python/pulumi_pulumi_kubernetes_crds_operators_ibm_block_csi_operator_community/csi/v1/_inputs.py
values
pulumi/pulumi-kubernetes-crds
0
python
@property @pulumi.getter def values(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: '\n \n ' return pulumi.get(self, 'values')
@property @pulumi.getter def values(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: '\n \n ' return pulumi.get(self, 'values')<|docstring|>An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.<|endoftext|>