Пример #1
0
 def ConstructNonRelationalDb(self):
     """Create the non_relational db and create groups for its vms."""
     db_spec: non_relational_db.BaseNonRelationalDbSpec = self.config.non_relational_db
     if db_spec is None:
         return
     logging.info('Constructing non-relational db instance with spec: %s.',
                  db_spec)
     service_type = db_spec.service_type
     non_relational_db_class = non_relational_db.GetNonRelationalDbClass(
         service_type)
     self.non_relational_db = non_relational_db_class.FromSpec(db_spec)
Пример #2
0
 def ConstructNonRelationalDb(self) -> None:
   """Initializes the non_relational db."""
   db_spec: non_relational_db.BaseNonRelationalDbSpec = self.config.non_relational_db
   if not db_spec:
     return
   # Initialization from restore spec
   if self._InitializeFromSpec('non_relational_db', db_spec):
     return
   # Initialization from benchmark config spec
   logging.info('Constructing non_relational_db instance with spec: %s.',
                db_spec)
   service_type = db_spec.service_type
   non_relational_db_class = non_relational_db.GetNonRelationalDbClass(
       service_type)
   self.non_relational_db = non_relational_db_class.FromSpec(db_spec)
Пример #3
0
 def ConstructNonRelationalDb(self) -> None:
     """Creates the non_relational db."""
     db_spec: non_relational_db.BaseNonRelationalDbSpec = self.config.non_relational_db
     if not db_spec:
         return
     if self.restore_spec:
         logging.info(
             'Getting non_relational_db instance from restore_spec: %s.',
             self.restore_spec.non_relational_db)
         self.non_relational_db = copy.copy(
             self.restore_spec.non_relational_db)
         return
     logging.info('Constructing non_relational_db instance with spec: %s.',
                  db_spec)
     service_type = db_spec.service_type
     non_relational_db_class = non_relational_db.GetNonRelationalDbClass(
         service_type)
     self.non_relational_db = non_relational_db_class.FromSpec(db_spec)