This is an automated email from the ASF dual-hosted git repository.
DImuthuUpe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-custos.git
The following commit(s) were added to refs/heads/master by this push:
new 0a9c107f3 Cleaning stale code
0a9c107f3 is described below
commit 0a9c107f36009af707b9d80db1d1e82a76c4e742
Author: Dimuthu Wannipurage <[email protected]>
AuthorDate: Mon May 18 00:42:25 2026 -0400
Cleaning stale code
---
core/accountprovisioning/go.mod | 3 --
core/accountprovisioning/noop.go | 57 -----------------------
core/accountprovisioning/provisioner.go | 81 ---------------------------------
3 files changed, 141 deletions(-)
diff --git a/core/accountprovisioning/go.mod b/core/accountprovisioning/go.mod
deleted file mode 100644
index ae683d105..000000000
--- a/core/accountprovisioning/go.mod
+++ /dev/null
@@ -1,3 +0,0 @@
-module github.com/apache/airavata-custos/core/accountprovisioning
-
-go 1.22
diff --git a/core/accountprovisioning/noop.go b/core/accountprovisioning/noop.go
deleted file mode 100644
index 7f333e99c..000000000
--- a/core/accountprovisioning/noop.go
+++ /dev/null
@@ -1,57 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-package accountprovisioning
-
-import "context"
-
-// Compile-time interface check.
-var _ AccountProvisioner = (*Noop)(nil)
-
-// Noop is a Provisioner that performs no operations. Used during development
-// and as a fallback when no real provisioner is configured.
-type Noop struct{}
-
-// NewNoop returns a new Noop provisioner.
-func NewNoop() *Noop {
- return &Noop{}
-}
-
-// ProvisionAccount is a no-op and returns a zero-value AccountResult.
-func (n *Noop) ProvisionAccount(_ context.Context, _ AccountRequest)
(AccountResult, error) {
- return AccountResult{}, nil
-}
-
-// DeprovisionAccount is a no-op.
-func (n *Noop) DeprovisionAccount(_ context.Context, _ string) error {
- return nil
-}
-
-// ProvisionProject is a no-op.
-func (n *Noop) ProvisionProject(_ context.Context, _ ProjectRequest) error {
- return nil
-}
-
-// DeprovisionProject is a no-op.
-func (n *Noop) DeprovisionProject(_ context.Context, _ string) error {
- return nil
-}
-
-// HealthCheck is a no-op and always reports healthy.
-func (n *Noop) HealthCheck(_ context.Context) error {
- return nil
-}
diff --git a/core/accountprovisioning/provisioner.go
b/core/accountprovisioning/provisioner.go
deleted file mode 100644
index adedc4b46..000000000
--- a/core/accountprovisioning/provisioner.go
+++ /dev/null
@@ -1,81 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-// Package provisioner defines the interface for HPC cluster account and
project
-// provisioning. It provides a common abstraction that decouples allocation
-// management logic from the details of individual cluster provisioning
systems.
-// Implementations handle the creation and removal of user accounts and project
-// allocations on target HPC resources.
-package accountprovisioning
-
-import "context"
-
-// AccountRequest contains the information needed to provision a user account
-// on an HPC cluster.
-type AccountRequest struct {
- PersonID string
- FirstName string
- LastName string
- Email string
- ProjectID string
- Role string
- DNList []string
- Resources []string
-}
-
-// AccountResult contains the details of a successfully provisioned account.
-type AccountResult struct {
- Username string
- AccountID string
- HomeDir string
- UID int
-}
-
-// ProjectRequest contains the information needed to provision a project
-// allocation on one or more HPC resources.
-type ProjectRequest struct {
- ProjectID string
- GrantNumber string
- Resources []string
-}
-
-// Provisioner is the interface that HPC cluster provisioning backends must
-// implement. Each method accepts a context for cancellation and deadline
-// propagation. Implementations are expected to be safe for concurrent use.
-type Provisioner interface {
- // ProvisionAccount creates a user account on the target HPC resource(s)
- // described by the request. It returns the resulting account details or
- // an error if provisioning fails.
- ProvisionAccount(ctx context.Context, req AccountRequest)
(AccountResult, error)
-
- // DeprovisionAccount removes or disables the account identified by
- // username from the target HPC resource(s).
- DeprovisionAccount(ctx context.Context, username string) error
-
- // ProvisionProject creates a project allocation on the target HPC
- // resource(s) described by the request.
- ProvisionProject(ctx context.Context, req ProjectRequest) error
-
- // DeprovisionProject removes or disables the project allocation
- // identified by projectID from the target HPC resource(s).
- DeprovisionProject(ctx context.Context, projectID string) error
-
- // HealthCheck verifies that the provisioning backend is reachable and
- // operational. It returns nil when healthy or an error describing the
- // failure.
- HealthCheck(ctx context.Context) error
-}