def test_organization_admins_delete(self):
     """ The organizations.admins.delete endpoint should be correct. """
     self.assertEqual(
         "https://dashboard.meraki.com/api/v0/organizations/" +
         ORGANIZATION_ID + "/admins/" + ADMIN_ID,
         MerakiAPI(KEY).organizations(ORGANIZATION_ID).admins(
             ADMIN_ID).lazy().delete().get_url())
Пример #2
0
 def test_organization_samlRoles_delete(self):
     """ The organizations.samlRoles.delete endpoint should be correct. """
     self.assertEqual(
         "https://dashboard.meraki.com/api/v0/organizations/" +
         ORGANIZATION_ID + "/samlRoles/" + ADMIN_ID,
         MerakiAPI(KEY).organizations(ORGANIZATION_ID).saml_roles(
             ADMIN_ID).lazy().delete().cached.url)
Пример #3
0
 def test_organization_config_templates_delete(self):
     """
     The organizations.config_templates.delete endpoint should be correct.
     """
     self.assertEqual(
         "https://dashboard.meraki.com/api/v0/organizations/" +
         ORGANIZATION_ID + "/configTemplates/" + CONFIG_TEMPLATE_ID,
         MerakiAPI(KEY).organizations(ORGANIZATION_ID).config_templates(
             CONFIG_TEMPLATE_ID).lazy().delete().cached.url)
Пример #4
0
 def test_organization_config_templates_index(self):
     """
     The organizations.config_templates.index endpoint should be correct.
     """
     self.assertEqual(
         "https://dashboard.meraki.com/api/v0/organizations/" +
         ORGANIZATION_ID + "/configTemplates",
         MerakiAPI(KEY).organizations(
             ORGANIZATION_ID).config_templates().lazy().index().cached.url)
Пример #5
0
 def test_organizations_create(self):
     """ Tes organizations.create endpoint should be correct. """
     self.assertEqual(
         "https://dashboard.meraki.com/api/v0/organizations"
         , MerakiAPI(KEY)
         .organizations()
         .lazy()
         .create({})
         .cached
         .url
     )
Пример #6
0
 def test_organizations_licenseState(self):
     """ The organizations.licenseState endpoint should be correct. """
     self.assertEqual(
         "https://dashboard.meraki.com/api/v0/organizations/"
         + str(ORGANIZATION_ID)
         + "/licenseState",
         MerakiAPI(KEY)
         .organizations(ORGANIZATION_ID)
         .lazy()
         .license_state()
         .cached.url
     )
Пример #7
0
 def test_organizations_claim(self):
     """ The organizations.claim endpoint should be correct. """
     self.assertEqual(
         "https://dashboard.meraki.com/api/v0/organizations/"
         + str(ORGANIZATION_ID)
         + "/claim",
         MerakiAPI(KEY)
         .organizations(ORGANIZATION_ID)
         .lazy()
         .claim({})
         .cached.url
     )
Пример #8
0
 def test_organizations_delete(self):
     """ The organizations.delete enpoint. """
     self.assertEqual(
         "https://dashboard.meraki.com/api/v0/organizations/"
         + str(ORGANIZATION_ID)
         , MerakiAPI(KEY)
         .organizations(ORGANIZATION_ID)
         .lazy()
         .delete()
         .cached
         .url
     )
Пример #9
0
 def test_organizations_updateThirdPartyVPNPeers(self):
     """ The organizations.thirdPartyVPNPeers endpoint should be correct. """
     self.assertEqual(
         "https://dashboard.meraki.com/api/v0/organizations/"
         + str(ORGANIZATION_ID)
         + "/thirdPartyVPNPeers",
         MerakiAPI(KEY)
         .organizations(ORGANIZATION_ID)
         .lazy()
         .update_third_party_vpn_peers({})
         .cached.url
     )
 def test_organization_networks_create(self):
     """ The organizations.networks.create endpoint should be correct. """
     self.assertEqual(
         "https://dashboard.meraki.com/api/v0/organizations/"
         + ORGANIZATION_ID
         + "/networks"
         , MerakiAPI(KEY)
         .organizations(ORGANIZATION_ID)
         .networks()
         .lazy()
         .create({})
         .cached
         .url
     )
    def test_organization_networks_traffic(self):
        """ The organizations.networks.traffic endpoint should be correct. """
        req = MerakiAPI(KEY).organizations(ORGANIZATION_ID).networks(NETWORK_ID).lazy().traffic({
                "timespan": 7200,
                "deviceType": "wireless"
            })

        self.assertEqual(
            "https://dashboard.meraki.com/api/v0/organizations/"
            + ORGANIZATION_ID
            + "/networks/"
            + NETWORK_ID
            + "/traffic"
            , req
            .cached
            .url
        )
        self.assertEqual(
            {'deviceType': 'wireless', 'timespan': 7200}
            , req
            .cached
            .data
)
Пример #12
0
 def test_organizations_index(self):
     """ The organizations.index endpoint should be correct. """
     self.assertEqual(
         "https://dashboard.meraki.com/api/v0/organizations",
         MerakiAPI(KEY).organizations().lazy().index().cached.url
     )