Exemple #1
0
    def get_state_id(self):
        """
        Check if CS synchronized with the device.
        :return: Synchronization ID, GetStateIdResponseInfo(-1) if not used
        :rtype: cloudshell.layer_one.core.response.response_info.GetStateIdResponseInfo
        :raises Exception: if command failed

        Example:
            # Obtain cli session
            with self._cli_handler.default_mode_service() as session:
                # Execute command
                chassis_name = session.send_command('show chassis name')
                return chassis_name
        """
        return GetStateIdResponseInfo(-1)
    def get_state_id(self):
        """
        Check if CS synchronized with the device.
        :return: Synchronization ID, GetStateIdResponseInfo(-1) if not used
        :rtype: cloudshell.layer_one.core.response.response_info.GetStateIdResponseInfo
        :raises Exception: if command failed

        Example:
            state_id = self._state_flow.get_id()
            return GetStateIdResponseInfo(state_id)
        """
        response_data = self._chassis_table[Address(1)].get(
            'nbsCmmcChassisName')
        if not response_data:
            response_data = -1
        return GetStateIdResponseInfo(response_data)
 def get_state_id(self):
     return GetStateIdResponseInfo("-1")