code: def db_to_dict(db):
      
      return {
              A.database.HOST: db.hostname,
              A.database.PORT: db.port,
              }
docs: Returns the :class:`dict` representation of a database object.
  
      The returned :class:`dict` is meant to be consumed by
      :class:`~bang.deployers.cloud.ServerDeployer` objects.