示例#1
0
 def create(self, duplication_allowed=False):
     constraint.create_with_set(
         "rsc_some",
         lambda cib, options, resource_set_list: options,
         self.env,
         [
             {
                 "ids": ["A", "B"],
                 "options": {
                     "role": self.role
                 }
             },
             {
                 "ids": ["E", "F"],
                 "options": {
                     "action": "start"
                 }
             },
         ],
         {
             "id": "some_id",
             "symmetrical": "true"
         },
         duplication_alowed=duplication_allowed,
     )
示例#2
0
 def create(self, tag_name, resource_set_list):
     constraint.create_with_set(
         tag_name,
         lambda cib, options, resource_set_list: options,
         self.env,
         resource_set_list,
         {"id":"some_id", "symmetrical": "true"},
     )
示例#3
0
 def create(self, tag_name, resource_set_list):
     constraint.create_with_set(
         tag_name,
         lambda cib, options, resource_set_list: options,
         self.env,
         resource_set_list,
         {
             "id": "some_id",
             "symmetrical": "true"
         },
     )
示例#4
0
 def create(self, duplication_alowed=False):
     constraint.create_with_set(
         "rsc_some",
         lambda cib, options, resource_set_list: options,
         self.env,
         [
             {"ids": ["A", "B"], "options": {"role": "Master"}},
             {"ids": ["E", "F"], "options": {"action": "start"}},
         ],
         {"id":"some_id", "symmetrical": "true"},
         duplication_alowed=duplication_alowed
     )