Exemplo n.º 1
0
    def get_function_target_subscription_ids(self):
        self._initialize_session()

        if constants.ENV_FUNCTION_MANAGEMENT_GROUP_NAME in os.environ:
            return ManagedGroupHelper.get_subscriptions_list(
                os.environ[constants.ENV_FUNCTION_MANAGEMENT_GROUP_NAME], self.get_credentials())

        return [os.environ.get(constants.ENV_FUNCTION_SUB_ID, self.subscription_id)]
Exemplo n.º 2
0
    def get_function_target_subscription_ids(self):
        self._initialize_session()

        if constants.ENV_FUNCTION_MANAGED_GROUP_NAME in os.environ:
            return ManagedGroupHelper.get_subscriptions_list(
                os.environ[constants.ENV_FUNCTION_MANAGED_GROUP_NAME], self.get_credentials())

        return [os.environ.get(constants.ENV_FUNCTION_SUB_ID, self.subscription_id)]
Exemplo n.º 3
0
 def test_managed_group_helper(self, _1):
     sub_ids = ManagedGroupHelper.get_subscriptions_list('test-group', "")
     self.assertEqual(sub_ids, [DEFAULT_SUBSCRIPTION_ID, GUID])
 def test_managed_group_helper(self, _1):
     sub_ids = ManagedGroupHelper.get_subscriptions_list('test-group', "")
     self.assertEqual(sub_ids, [DEFAULT_SUBSCRIPTION_ID, GUID])