# Path: credentials.py
# VMWARE_VCENTER_USERNAME = "domain\\username"
# VMWARE_VCENTER_PASSWORD = "yourpassword"
# SNMP_COMMUNITY = "public"
# TINTRI_USER = "youraccount"
# TINTRI_PASSWORD = "yourpassword"
# WORKDESK_USER = 'youraccount'
# WORKDESK_PASSWORD = 'yourpassword'
# RUBRIK_USER = 'youraccount'
# RUBRIK_PASSWORD = 'yourpassword'
# NUTANIX_USER = 'youraccount'
# NUTANIX_PASSWORD = 'yourpassword'
# 
# Path: credentials.py
# VMWARE_VCENTER_USERNAME = "domain\\username"
# VMWARE_VCENTER_PASSWORD = "yourpassword"
# SNMP_COMMUNITY = "public"
# TINTRI_USER = "youraccount"
# TINTRI_PASSWORD = "yourpassword"
# WORKDESK_USER = 'youraccount'
# WORKDESK_PASSWORD = 'yourpassword'
# RUBRIK_USER = 'youraccount'
# RUBRIK_PASSWORD = 'yourpassword'
# NUTANIX_USER = 'youraccount'
# NUTANIX_PASSWORD = 'yourpassword'


import json
import time
import logging.config
import base64
import requests
from credentials import NETAPP_USER  # Login info now stored in credentials.py
from credentials import NETAPP_PASSWORD  # Login info now stored in credentials.py

__author__ = 'scott@flakshack.com (Scott Vintinner)'

# =================================SETTINGS======================================
NETAPP_URL = "https://netapp1/api"
SAMPLE_INTERVAL = 60
MAX_DATAPOINTS = 30
# ===============================================================================


class NetAppData:
    """This class will contain all of the data gathered during processing"""
    def __init__(self):
        self.iops = []
        self.throughput = []
        self.latency = []
        self.node_status = "ERR"
        self.used = 0
        self.available = 0
        self.logical_used = 0
        self.saved = 0


class MonitorJSON:
    """This is a simple class passed to Monitor threads so we can access the current JSON data in that thread"""
    def __init__(self):
        self.json = ""
        self.session = None
        self.data = NetAppData()
        base64string = base64.encodebytes(

# Path: credentials.py
# VMWARE_VCENTER_USERNAME = "domain\\username"
# VMWARE_VCENTER_PASSWORD = "yourpassword"
# SNMP_COMMUNITY = "public"
# TINTRI_USER = "youraccount"
# TINTRI_PASSWORD = "yourpassword"
# WORKDESK_USER = 'youraccount'
# WORKDESK_PASSWORD = 'yourpassword'
# RUBRIK_USER = 'youraccount'
# RUBRIK_PASSWORD = 'yourpassword'
# NUTANIX_USER = 'youraccount'
# NUTANIX_PASSWORD = 'yourpassword'
# 
# Path: credentials.py
# VMWARE_VCENTER_USERNAME = "domain\\username"
# VMWARE_VCENTER_PASSWORD = "yourpassword"
# SNMP_COMMUNITY = "public"
# TINTRI_USER = "youraccount"
# TINTRI_PASSWORD = "yourpassword"
# WORKDESK_USER = 'youraccount'
# WORKDESK_PASSWORD = 'yourpassword'
# RUBRIK_USER = 'youraccount'
# RUBRIK_PASSWORD = 'yourpassword'
# NUTANIX_USER = 'youraccount'
# NUTANIX_PASSWORD = 'yourpassword'


# Path: netapp.py
import json
import time
import logging.config
import base64
import requests
from credentials import NETAPP_USER  # Login info now stored in credentials.py
from credentials import NETAPP_PASSWORD  # Login info now stored in credentials.py


__author__ = 'scott@flakshack.com (Scott Vintinner)'

# =================================SETTINGS======================================
NETAPP_URL = "https://netapp1/api"
SAMPLE_INTERVAL = 60
MAX_DATAPOINTS = 30
# ===============================================================================


class NetAppData:
    """This class will contain all of the data gathered during processing"""
    def __init__(self):
        self.iops = []
        self.throughput = []
        self.latency = []
        self.node_status = "ERR"
        self.used = 0
        self.available = 0
        self.logical_used = 0
        self.saved = 0


class MonitorJSON:
    """This is a simple class passed to Monitor threads so we can access the current JSON data in that thread"""
    def __init__(self):
        self.json = ""
        self.session = None
        self.data = NetAppData()
        base64string = base64.encodebytes(

            ('%s:%s' % (NETAPP_USER, NETAPP_PASSWORD)).encode()