Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api versions compatibility #34

Open
suslikas opened this issue Jul 12, 2016 · 0 comments
Open

api versions compatibility #34

suslikas opened this issue Jul 12, 2016 · 0 comments

Comments

@suslikas
Copy link

Hi,

I try to use you code to make monitoring for ScaleIO API version 2.0 cluster and find big problems in code constructions and implementation. You miss flexibility and make very hard implementation for switching between API versions.

Example:

    def __init__(self,
        id=None,
        name=None,
        systemVersionName=None,
        primaryMdmActorIpList = None, #List
        primaryMdmActorPort = None,
        secondaryMdmActorIpList = None, #List
        secondaryMdmActorPort = None,.
        tiebreakerMdmIpList = None,  #List
        tiebreakerMdmPort = None, # This one is defined in ScaleIO 1.30 API, but seem not present in 1.31??
        tiebreakerMdmActorPort = None,
        mdmMode = None, #Single or Cluster
        mdmClusterState = None, # NotClustered or ClusteredNormal or ClusteredDegraded or ClusteredTiebreakerDown or ClusteredDegradedTiebreakerDown
        mdmManagementIpList = None, # List
        mdmManagementPort = None,.
        capacityAlertHighThresholdPercent = None,
        capacityAlertCriticalThresholdPercent = None,
        installId = None,.
        swid = None, # This one seem not to return anything. Its define din 1.30. What about 1.31????
        daysInstalled = None,.
        maxCapacityInGb = None,
        capacityTimeLeftInDays = None,.
        enterpriseFeaturesEnabled = None,.
        defaultIsVolumeObfuscated = None,
        isInitialLicense = None,.
        restrictedSdcModeEnabled = None,
        remoteReadOnlyLimitState = None,
        links = None,

You define all, nice, but we got more variables in new API version

        sdcSocketAllocationFailuresCounterParameters = None,
        cliPasswordAllowed = None,
        authenticationMethod = None,
        performanceParameters = None,
        sdcLongOperationsCounterParameters = None,
        sdcMdmNetworkDisconnectionsCounterParameters = None,
        managementClientSecureCommunicationEnabled = None,
        mdmToSdsPolicy = None,
        tlsVersion = None,
        currentProfilePerformanceParameters = None,
        mdmCluster = None,
        sdcMemoryAllocationFailuresCounterParameters = None,
        upgradeState = None,
        showGuid = None,
        sdcSdsNetworkDisconnectionsCounterParameters = None

In version 2.1 we can get on top +1, then +1.... and you always must add new..., better to implement exclusions and dynamically and recursive read all what you get from API. In this way you will need just create functions wrappers who adopt calls to oldest api version if some value are deprecated or renamed...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant