-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #307 from Azure/feature-data-plane-support
Support data plane command generation.
- Loading branch information
Showing
93 changed files
with
4,899 additions
and
2,136 deletions.
There are no files selected for viewing
Binary file added
BIN
+2.03 MB
docs/assets/recordings/workspace_editor/dataplane_edit_client_config.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.42 MB
docs/assets/recordings/workspace_editor/dataplane_new_client_config.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
from utils import exceptions | ||
import logging | ||
from cli.model.atomic import CLIAtomicCommand, CLIAtomicClient | ||
|
||
logger = logging.getLogger('backend') | ||
|
||
|
||
class AzClientsGenerator: | ||
|
||
def __init__(self, clients: [CLIAtomicClient]): | ||
# only clients with cfg will be generated. | ||
self._clients = sorted([client for client in clients if client.cfg], key=lambda c: c.registered_name) | ||
|
||
def iter_clients(self): | ||
for client in self._clients: | ||
yield AzClientGenerator(client) | ||
|
||
def is_empty(self): | ||
return len(self._clients) == 0 | ||
|
||
|
||
class AzClientGenerator: | ||
|
||
def __init__(self, client): | ||
self._client = client | ||
|
||
@property | ||
def registered_name(self): | ||
return self._client.registered_name | ||
|
||
def iter_hosts(self): | ||
for template in self._client.cfg.endpoints.templates: | ||
yield template.cloud, template.template | ||
|
||
@property | ||
def aad_scopes(self): | ||
return self._client.cfg.auth.aad.scopes |
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.