Example #1
0
    def GET(self):
        """:returns: FUEL/FUELWeb commit SHA, release version.
        :http: * 200 (OK)
        """
        version = settings.VERSION
        method = settings.AUTH['AUTHENTICATION_METHOD']
        version['auth_required'] = method in ['fake', 'keystone']

        version['release_versions'] = utils.get_fuel_release_versions(
            self.release_versions)
        return version
Example #2
0
    def GET(self):
        """:returns: FUEL/FUELWeb commit SHA, release version.
        :http: * 200 (OK)
        """
        version = settings.VERSION
        method = settings.AUTH['AUTHENTICATION_METHOD']
        version['auth_required'] = method in ['fake', 'keystone']

        version['release_versions'] = utils.get_fuel_release_versions(
            self.release_versions)
        return version
Example #3
0
 def fuel_release_info(self):
     versions = utils.get_fuel_release_versions(settings.FUEL_VERSION_FILE)
     if settings.FUEL_VERSION_KEY not in versions:
         versions[settings.FUEL_VERSION_KEY] = settings.VERSION
     return versions[settings.FUEL_VERSION_KEY]
Example #4
0
 def fuel_release_info(self):
     versions = utils.get_fuel_release_versions(settings.FUEL_VERSION_FILE)
     if settings.FUEL_VERSION_KEY not in versions:
         versions[settings.FUEL_VERSION_KEY] = settings.VERSION
     return versions[settings.FUEL_VERSION_KEY]
Example #5
0
 def test_get_release_no_file(self):
     with tempfile.NamedTemporaryFile() as tf:
         file_path = tf.name
     self.assertFalse(os.path.exists(file_path))
     versions = get_fuel_release_versions(file_path)
     self.assertDictEqual({}, versions)
Example #6
0
 def test_get_release_versions_empty_file(self):
     with tempfile.NamedTemporaryFile() as tf:
         versions = get_fuel_release_versions(tf.name)
         self.assertDictEqual({os.path.basename(tf.name): None}, versions)
Example #7
0
 def test_get_release_versions(self, _):
     versions = get_fuel_release_versions(None)
     self.assertDictEqual({'test': 'test_data'}, versions)
Example #8
0
 def test_get_release_versions_empty_file(self):
     with tempfile.NamedTemporaryFile() as tf:
         versions = get_fuel_release_versions(tf.name)
         self.assertDictEqual({os.path.basename(tf.name): None}, versions)
Example #9
0
 def test_get_release_versions(self, _):
     versions = get_fuel_release_versions(None)
     self.assertDictEqual({'test': 'test_data'}, versions)
Example #10
0
 def test_get_release_no_file(self):
     with tempfile.NamedTemporaryFile() as tf:
         file_path = tf.name
     self.assertFalse(os.path.exists(file_path))
     versions = get_fuel_release_versions(file_path)
     self.assertDictEqual({}, versions)