{"id":30882336,"url":"https://github.com/panoramicdata/siderolabs.omni.api","last_synced_at":"2025-09-08T08:46:11.499Z","repository":{"id":313347340,"uuid":"1050551154","full_name":"panoramicdata/SideroLabs.Omni.Api","owner":"panoramicdata","description":"a .NET Nuget package for Sidero Labs Inc's Omni","archived":false,"fork":false,"pushed_at":"2025-09-05T13:02:23.000Z","size":64,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-05T13:36:20.121Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/panoramicdata.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-04T15:33:37.000Z","updated_at":"2025-09-05T13:02:26.000Z","dependencies_parsed_at":"2025-09-05T13:48:35.664Z","dependency_job_id":null,"html_url":"https://github.com/panoramicdata/SideroLabs.Omni.Api","commit_stats":null,"previous_names":["panoramicdata/siderolabs.omni.api"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/panoramicdata/SideroLabs.Omni.Api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panoramicdata%2FSideroLabs.Omni.Api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panoramicdata%2FSideroLabs.Omni.Api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panoramicdata%2FSideroLabs.Omni.Api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panoramicdata%2FSideroLabs.Omni.Api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/panoramicdata","download_url":"https://codeload.github.com/panoramicdata/SideroLabs.Omni.Api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panoramicdata%2FSideroLabs.Omni.Api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274159642,"owners_count":25232636,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-08T08:46:01.170Z","updated_at":"2025-09-08T08:46:09.808Z","avatar_url":"https://github.com/panoramicdata.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SideroLabs.Omni.Api\n\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/YOUR_PROJECT_ID_HERE)](https://app.codacy.com/gh/panoramicdata/SideroLabs.Omni.Api/dashboard?utm_source=gh\u0026utm_medium=referral\u0026utm_content=\u0026utm_campaign=Badge_grade)\n[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/YOUR_PROJECT_ID_HERE)](https://app.codacy.com/gh/panoramicdata/SideroLabs.Omni.Api/dashboard?utm_source=gh\u0026utm_medium=referral\u0026utm_content=\u0026utm_campaign=Badge_coverage)\n[![NuGet](https://img.shields.io/nuget/v/SideroLabs.Omni.Api.svg)](https://www.nuget.org/packages/SideroLabs.Omni.Api/)\n[![NuGet](https://img.shields.io/nuget/dt/SideroLabs.Omni.Api.svg)](https://www.nuget.org/packages/SideroLabs.Omni.Api/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nA .NET client library for interacting with the [SideroLabs Omni](https://omni.siderolabs.com/) Management API using gRPC.\n\n## Features\n\n- **Complete API Coverage** - Support for all cluster and machine management operations\n- **gRPC-based** - High-performance communication with the Omni Management API\n- **Async/Await** - Modern asynchronous programming patterns throughout\n- **Cancellation Support** - Proper cancellation token support for all operations\n- **Dependency Injection** - Built-in support for .NET dependency injection\n- **Type Safety** - Strongly typed models for all API operations\n- **Authentication** - Bearer token authentication support\n- **TLS Configuration** - Flexible TLS and certificate validation options\n\n## Installation\n\nInstall the package via NuGet:\n\n```bash\ndotnet add package SideroLabs.Omni.Api\n```\n\nOr via the Package Manager Console:\n\n```powershell\nInstall-Package SideroLabs.Omni.Api\n```\n\n## Quick Start\n\n### Basic Usage\n\n```csharp\nusing SideroLabs.Omni.Api;\nusing SideroLabs.Omni.Api.Models;\n\n// Configure the client\nvar options = new OmniClientOptions\n{\n    Endpoint = \"https://your-omni-instance.com:8443\",\n    AuthToken = \"your-auth-token\",\n    TimeoutSeconds = 30\n};\n\n// Create the client\nusing var client = new OmniClient(options);\nusing var cts = new CancellationTokenSource();\n\n// Get service status\nvar status = await client.GetStatusAsync(cts.Token);\nConsole.WriteLine($\"Omni v{status.Version} - Ready: {status.Ready}\");\n\n// List clusters\nvar clusters = await client.ListClustersAsync(cts.Token);\nforeach (var cluster in clusters.Clusters)\n{\n    Console.WriteLine($\"Cluster: {cluster.Name} ({cluster.Status.Phase})\");\n}\n```\n\n### Dependency Injection\n\nIn your `Program.cs` or `Startup.cs`:\n\n```csharp\nusing SideroLabs.Omni.Api.Extensions;\n\n// Add the Omni client to DI\nbuilder.Services.AddOmniClient(options =\u003e\n{\n    options.Endpoint = builder.Configuration[\"Omni:Endpoint\"];\n    options.AuthToken = builder.Configuration[\"Omni:AuthToken\"];\n    options.TimeoutSeconds = 30;\n});\n\n// Or from configuration section\nbuilder.Services.Configure\u003cOmniClientOptions\u003e(\n    builder.Configuration.GetSection(\"Omni\"));\nbuilder.Services.AddSingleton\u003cOmniClient\u003e();\n```\n\nConfiguration in `appsettings.json`:\n\n```json\n{\n  \"Omni\": {\n    \"Endpoint\": \"https://your-omni-instance.com:8443\",\n    \"AuthToken\": \"your-auth-token\",\n    \"TimeoutSeconds\": 30,\n    \"UseTls\": true,\n    \"ValidateCertificate\": true\n  }\n}\n```\n\n## API Operations\n\n### Cluster Management\n\n```csharp\n// Create a cluster\nvar spec = new ClusterSpec\n{\n    KubernetesVersion = \"v1.28.0\",\n    TalosVersion = \"v1.5.0\",\n    Features = new List\u003cstring\u003e { \"embedded-discovery-service\" }\n};\n\nvar createResponse = await client.CreateClusterAsync(\"my-cluster\", spec, cancellationToken);\n\n// Get a specific cluster\nvar cluster = await client.GetClusterAsync(\"cluster-id\", cancellationToken);\n\n// Update a cluster\nvar updateResponse = await client.UpdateClusterAsync(\"cluster-id\", updatedSpec, cancellationToken);\n\n// Delete a cluster\nawait client.DeleteClusterAsync(\"cluster-id\", cancellationToken);\n```\n\n### Machine Management\n\n```csharp\n// List machines in a cluster\nvar machines = await client.ListMachinesAsync(\"cluster-id\", cancellationToken);\n\n// Get a specific machine\nvar machine = await client.GetMachineAsync(\"machine-id\", cancellationToken);\n\n// Update machine labels\nvar machineSpec = new MachineSpec\n{\n    Role = \"worker\",\n    Labels = new Dictionary\u003cstring, string\u003e\n    {\n        { \"environment\", \"production\" },\n        { \"zone\", \"us-west-2a\" }\n    }\n};\n\nawait client.UpdateMachineAsync(\"machine-id\", machineSpec, cancellationToken);\n```\n\n## Configuration Options\n\n| Option | Type | Default | Description |\n|--------|------|---------|-------------|\n| `Endpoint` | `string` | Required | The gRPC endpoint URL for the Omni Management API |\n| `AuthToken` | `string?` | `null` | Bearer token for authentication |\n| `TimeoutSeconds` | `int` | `30` | Timeout for gRPC calls in seconds |\n| `UseTls` | `bool` | `true` | Whether to use TLS for the connection |\n| `ValidateCertificate` | `bool` | `true` | Whether to validate the server certificate |\n\n## Error Handling\n\nThe client throws standard .NET exceptions for error conditions:\n\n```csharp\ntry\n{\n    var clusters = await client.ListClustersAsync(cancellationToken);\n}\ncatch (OperationCanceledException)\n{\n    // Handle cancellation\n}\ncatch (RpcException ex)\n{\n    // Handle gRPC-specific errors\n    Console.WriteLine($\"gRPC Error: {ex.Status.Detail}\");\n}\ncatch (Exception ex)\n{\n    // Handle other errors\n    Console.WriteLine($\"Error: {ex.Message}\");\n}\n```\n\n## Development Status\n\nThis library is currently in development. The API surface is stable, but the underlying implementation is transitioning from mock responses to real gRPC calls to the Omni Management API.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Support\n\nFor questions and support, please open an issue on the [GitHub repository](https://github.com/panoramicdata/SideroLabs.Omni.Api/issues).\n\n---\n\n**Copyright © Panoramic Data Limited 2025**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpanoramicdata%2Fsiderolabs.omni.api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpanoramicdata%2Fsiderolabs.omni.api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpanoramicdata%2Fsiderolabs.omni.api/lists"}