Ejemplo n.º 1
0
    def machine_distribution(self):
        """
        Retrieves the distribution information of the host.

        :return: dictionary of the platform distribution as returned from
        'platform.dist()'
        """

        response = self.python(imports_line='import platform, json',
                               command='json.dumps(platform.dist())')
        return api_utils.json_loads(response)
Ejemplo n.º 2
0
    def machine_distribution(self):

        """
        Retrieves the distribution information of the host.

        :return: dictionary of the platform distribution as returned from
        'platform.dist()'
        """

        response = self.python(
            imports_line='import platform, json',
            command='json.dumps(platform.dist())'
        )
        return api_utils.json_loads(response)
Ejemplo n.º 3
0
    def machine_distribution(self, **attributes):
        """
        Retrieves the distribution information of the host.

        :param attributes: custom attributes passed directly to
                           fabric's run command

        :return: dictionary of the platform distribution as returned from
                 'platform.dist()'

        """

        response = self.python(imports_line='import platform, json',
                               command='json.dumps(platform.dist())',
                               **attributes)
        return api_utils.json_loads(response)
Ejemplo n.º 4
0
    def machine_distribution(self, **attributes):

        """
        Retrieves the distribution information of the host.

        :param attributes: custom attributes passed directly to
                           fabric's run command

        :return: dictionary of the platform distribution as returned from
                 'platform.dist()'

        """

        response = self.python(
            imports_line='import platform, json',
            command='json.dumps(platform.dist())', **attributes
        )
        return api_utils.json_loads(response)