Ejemplo n.º 1
0
 def create(self, cancel=False):
     sel.force_navigate("automate_explorer_class_new",
                        context={"tree_item": self.namespace})
     fill(
         self.form,
         {
             'name_text':
             self.name,
             'description_text':
             self.description,
             # 'display_name_text': self.display_name,
             'inherits_from_select':
             self.inherits_from and self.inherits_from.path_str()
         },
         action={
             True: self.form.cancel_btn,
             False: self.form.add_btn
         }[cancel])
     try:
         flash.assert_success_message('Automate Class "%s" was added' %
                                      self.path_str())
     except Exception as e:
         if error.match("Name has already been taken", e):
             sel.click(self.form.cancel_btn)
         raise
Ejemplo n.º 2
0
 def create(self, content):
     self.create_form(content)
     try:
         flash.assert_success_message('Orchestration Template "{}" was saved'.format(
             self.template_name))
     except Exception as e:
         if error.match("Error during 'Orchestration Template creation': Validation failed: \
                         Md5 of content already exists (content must be unique)", e):
             self.create_form(content + " ")
         raise
Ejemplo n.º 3
0
 def create(self, cancel=False):
     sel.force_navigate("automate_explorer_method_new", context={'tree_item': self.cls})
     fill(self.form, {'name_text': self.name,
                      # 'display_name_text': self.display_name,
                      'data_text': self.data},
          action={True: self.form.cancel_btn, False: self.form.add_btn}[cancel])
     try:
         flash.assert_success_message('Automate Method "%s" was added' % self.name)
     except Exception as e:
         if error.match("Name has already been taken", e):
             sel.click(self.form.cancel_btn)
         raise
Ejemplo n.º 4
0
 def create(self, cancel=False):
     if self.parent is not None and not self.parent.exists():
         self.parent.create()
     sel.force_navigate("automate_explorer_method_new", context={'tree_item': self.cls})
     fill(self.form, {'name_text': self.name,
                      # 'display_name_text': self.display_name,
                      'data_text': self.data},
          action=form_buttons.cancel if cancel else form_buttons.add)
     try:
         flash.assert_success_message('Automate Method "%s" was added' % self.name)
     except Exception as e:
         if error.match("Name has already been taken", e):
             sel.click(form_buttons.cancel)
         raise
Ejemplo n.º 5
0
 def create(self, cancel=False):
     sel.force_navigate("automate_explorer_class_new", context={"tree_item": self.namespace})
     fill(self.form, {'name_text': self.name,
                      'description_text': self.description,
                      # 'display_name_text': self.display_name,
                      'inherits_from_select':
                      self.inherits_from and self.inherits_from.path_str()},
          action={True: self.form.cancel_btn, False: self.form.add_btn}[cancel])
     try:
         flash.assert_success_message('Automate Class "%s" was added' % self.path_str())
     except Exception as e:
         if error.match("Name has already been taken", e):
             sel.click(self.form.cancel_btn)
         raise
Ejemplo n.º 6
0
 def create(self, cancel=False, allow_duplicate=False):
     if self.parent is not None and not self.parent.exists():
         self.parent.create()
     if self.exists() and not allow_duplicate:
         return
     sel.force_navigate("automate_explorer_instance_new", context={'tree_item': self.cls})
     fill(self.form, {'name_text': self.name,
                      'display_name_text': self.display_name,
                      'description_text': self.description,
                      'values': self.values},
          action=form_buttons.cancel if cancel else form_buttons.add)
     try:
         flash.assert_success_message('Automate Instance "{}" was added'.format(self.name))
     except Exception as e:
         if error.match("Name has already been taken", e):
             sel.click(form_buttons.cancel)
         raise
Ejemplo n.º 7
0
 def create(self, cancel=False):
     if self.parent is not None and not self.parent.exists():
         self.parent.create()
     sel.force_navigate("automate_explorer_instance_new",
                        context={'tree_item': self.cls})
     fill(self.form, {
         'name_text': self.name,
         'display_name_text': self.display_name,
         'description_text': self.description,
         'values': self.values
     },
          action=form_buttons.cancel if cancel else form_buttons.add)
     try:
         flash.assert_success_message('Automate Instance "%s" was added' %
                                      self.name)
     except Exception as e:
         if error.match("Name has already been taken", e):
             sel.click(form_buttons.cancel)
         raise
Ejemplo n.º 8
0
 def create(self, cancel=False):
     sel.force_navigate("automate_explorer_method_new",
                        context={'tree_item': self.cls})
     fill(
         self.form,
         {
             'name_text': self.name,
             # 'display_name_text': self.display_name,
             'data_text': self.data
         },
         action={
             True: self.form.cancel_btn,
             False: self.form.add_btn
         }[cancel])
     try:
         flash.assert_success_message('Automate Method "%s" was added' %
                                      self.name)
     except Exception as e:
         if error.match("Name has already been taken", e):
             sel.click(self.form.cancel_btn)
         raise
Ejemplo n.º 9
0
 def create(self, cancel=False, allow_duplicate=False):
     if self.parent is not None and not self.parent.exists():
         self.parent.create()
     if self.exists() and not allow_duplicate:
         return
     navigate_to(self, "Add")
     fill(
         self.form,
         {
             "name_text": self.name,
             # 'display_name_text': self.display_name,
             "data_text": self.data,
         },
         action=form_buttons.cancel if cancel else form_buttons.add,
     )
     try:
         flash.assert_success_message('Automate Method "{}" was added'.format(self.name))
     except Exception as e:
         if error.match("Name has already been taken", e):
             sel.click(form_buttons.cancel)
         raise
Ejemplo n.º 10
0
 def create(self, cancel=False, allow_duplicate=False):
     if self.parent is not None and not self.parent.exists():
         self.parent.create()
     if self.exists() and not allow_duplicate:
         return
     sel.force_navigate("automate_explorer_method_new",
                        context={'tree_item': self.cls})
     fill(
         self.form,
         {
             'name_text': self.name,
             # 'display_name_text': self.display_name,
             'data_text': self.data
         },
         action=form_buttons.cancel if cancel else form_buttons.add)
     try:
         flash.assert_success_message('Automate Method "%s" was added' %
                                      self.name)
     except Exception as e:
         if error.match("Name has already been taken", e):
             sel.click(form_buttons.cancel)
         raise