forked from weaveworks/scope
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>
- Loading branch information
Showing
14 changed files
with
179 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package kubernetes | ||
|
||
import ( | ||
mayav1alpha1 "github.com/openebs/maya/pkg/apis/openebs.io/v1alpha1" | ||
"github.com/weaveworks/scope/report" | ||
) | ||
|
||
// BlockDeviceClaim represent NDM BlockDeviceClaim interface | ||
type BlockDeviceClaim interface { | ||
Meta | ||
GetNode(probeID string) report.Node | ||
} | ||
|
||
type blockDeviceClaim struct { | ||
*mayav1alpha1.BlockDeviceClaim | ||
Meta | ||
} | ||
|
||
// NewBlockDeviceClaim returns new block device claim type | ||
func NewBlockDeviceClaim(b *mayav1alpha1.BlockDeviceClaim) BlockDeviceClaim { | ||
return &blockDeviceClaim{BlockDeviceClaim: b, Meta: meta{b.ObjectMeta}} | ||
} | ||
|
||
// GetNode returns Block Device Claim as Node | ||
func (b *blockDeviceClaim) GetNode(probeID string) report.Node { | ||
return b.MetaNode(report.MakeBlockDeviceClaimNodeID(b.UID())).WithLatests(map[string]string{ | ||
NodeType: "Block Device Claim", | ||
BlockDeviceName: b.Spec.BlockDeviceName, | ||
HostName: b.Spec.HostName, | ||
Status: string(b.Status.Phase), | ||
report.ControlProbeID: probeID, | ||
}).WithLatestActiveControls(Describe) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.