Skip to content

Commit 1d33389

Browse files
author
Chris White
authored
Merge pull request #205 from vmware/development
pyVMC 2.0
2 parents 3c78e1d + 3b966fa commit 1d33389

37 files changed

+10373
-4581
lines changed

Diff for: .gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
config.ini
2+
__pycache__
3+
.DS_Store
4+

Diff for: Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.7-alpine
1+
FROM python:3.10-alpine
22

33
COPY . /app
44

Diff for: README.md

+178-198
Large diffs are not rendered by default.

Diff for: README.pdf

621 KB
Binary file not shown.

Diff for: config.ini.example

+5-13
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,9 @@ strCSPProdURL = https://console.cloud.vmware.com
44
strVCDRProdURL = https://vcdr-xxx-xxx-xxx-xxx.app.vcdr.vmware.com/
55

66
refresh_Token = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
7-
org_id = xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
8-
sddc_id = xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
9-
10-
[vtcConfig]
11-
MyAWS = AWS_account
12-
AWS_region = us-west-2
13-
DXGW_id = xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
14-
DXGW_owner = DXGW account owner
7+
#OR
8+
oauth_clientId = xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
9+
oauth_clientSecret = xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1510

16-
[tkgConfig]
17-
egress_CIDR = x.x.x.x/x
18-
ingress_CIDR = x.x.x.x/x
19-
namespace_CIDR = x.x.x.x/x
20-
service_CIDR = x.x.x.x/x
11+
org_id = xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
12+
sddc_id = xxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Diff for: docs/1-csp_help.txt

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
usage: csp [-h]
2+
{show-csp-services,show-csp-service-roles,get-access-token,add-users-to-csp-group,show-csp-group-diff,show-csp-group-members,show-csp-groups,search-csp-org-users,find-csp-user-by-service-role,show-org-users}
3+
...
4+
5+
positional arguments:
6+
{show-csp-services,show-csp-service-roles,get-access-token,add-users-to-csp-group,show-csp-group-diff,show-csp-group-members,show-csp-groups,search-csp-org-users,find-csp-user-by-service-role,show-org-users}
7+
csp sub-command help
8+
show-csp-services Show the entitled services in the
9+
VMware Cloud Service Console.
10+
show-csp-service-roles Show the entitled service roles in the
11+
VMware Cloud Service Console.
12+
get-access-token show your access token
13+
add-users-to-csp-group CSP user to a group
14+
show-csp-group-diff this compares the roles in the
15+
specified group with every user in the
16+
org and prints out a user-by-user diff
17+
show-csp-group-members show CSP group members
18+
show-csp-groups To show CSP groups which contain
19+
GROUP_SEARCH_TERM string
20+
search-csp-org-users Search for users in the CSP or org.
21+
find-csp-user-by-service-role Search for CSP users with a specific
22+
service role. First use show-csp-
23+
service-roles to see entitled roles
24+
show-org-users Show all organization users
25+
26+
optional arguments:
27+
-h, --help show this help message and exit

Diff for: docs/10-dfw_help.txt

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
usage: dfw [-h]
2+
{new-dfw-rule,new-dfw-section,remove-dfw-rule,remove-dfw-section,show-dfw-section,show-dfw-section-rules}
3+
...
4+
5+
positional arguments:
6+
{new-dfw-rule,new-dfw-section,remove-dfw-rule,remove-dfw-section,show-dfw-section,show-dfw-section-rules}
7+
dfw sub-command help
8+
new-dfw-rule create a new DFW security rule
9+
new-dfw-section create a new DFW section
10+
remove-dfw-rule delete a DFW rule
11+
remove-dfw-section delete a DFW section
12+
show-dfw-section show the DFW sections
13+
show-dfw-section-rules
14+
show the DFW security rules within a section
15+
16+
optional arguments:
17+
-h, --help show this help message and exit

Diff for: docs/11-nsxaf_help.txt

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
usage: nsxaf [-h]
2+
{show-nsxaf-status,show-ids-cluster-status,enable-cluster-ids,disable-cluster-ids,enable-all-cluster-ids,disable-all-cluster-ids,enable-ids-auto-update,ids-update-signatures,show-ids-signature-versions,show-ids-profiles,search-product-affected,create-ids-profile,show-ids-policies,create-ids-policy,show-ids-rules,create-ids-rule}
3+
...
4+
5+
positional arguments:
6+
{show-nsxaf-status,show-ids-cluster-status,enable-cluster-ids,disable-cluster-ids,enable-all-cluster-ids,disable-all-cluster-ids,enable-ids-auto-update,ids-update-signatures,show-ids-signature-versions,show-ids-profiles,search-product-affected,create-ids-profile,show-ids-policies,create-ids-policy,show-ids-rules,create-ids-rule}
7+
nsxaf sub-command help
8+
show-nsxaf-status Display the status of the NSX Advanced
9+
Firewall Add-on
10+
show-ids-cluster-status Show IDS status for each cluster in
11+
the SDDC
12+
enable-cluster-ids Enable IDS on cluster
13+
disable-cluster-ids Disable IDS on cluster
14+
enable-all-cluster-ids Enable IDS on all clusters
15+
disable-all-cluster-ids Disable IDS on all clusters
16+
enable-ids-auto-update Enable IDS signature auto update
17+
ids-update-signatures Force update of IDS signatures
18+
show-ids-signature-versions Show downloaded signature versions
19+
show-ids-profiles Show all IDS profiles
20+
search-product-affected Search through the active IDS
21+
signature for specific product
22+
affected. Useful when building an IDS
23+
Profile
24+
create-ids-profile Create an IDS profile with either
25+
Product Affected, CVSS or both.
26+
show-ids-policies List all IDS policies
27+
create-ids-policy Create an IDS policy
28+
show-ids-rules List all IDS rules
29+
create-ids-rule Create an IDS rule using previously
30+
created IDS profile and inventory
31+
groups
32+
33+
optional arguments:
34+
-h, --help show this help message and exit

Diff for: docs/12-inventory_help.txt

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
usage: inventory [-h]
2+
{new-group,remove-group,show-group,show-group-association,new-service,remove-service,show-services}
3+
...
4+
5+
positional arguments:
6+
{new-group,remove-group,show-group,show-group-association,new-service,remove-service,show-services}
7+
inventory sub-command help
8+
new-group create a new group
9+
remove-group remove a group
10+
show-group show existing groups
11+
show-group-association
12+
show security rules used by a groups
13+
new-service create a new service
14+
remove-service remove a service
15+
show-services show services
16+
17+
optional arguments:
18+
-h, --help show this help message and exit

Diff for: docs/13-system_help.txt

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
usage: system [-h]
2+
{show-dns-services,show-dns-zones,new-sddc-public-ip,remove-sddc-public-ip,set-sddc-public-ip,show-sddc-public-ip,mtu,asn,dx-admin-cost,show-egress-interface-counters,show-routes}
3+
...
4+
5+
positional arguments:
6+
{show-dns-services,show-dns-zones,new-sddc-public-ip,remove-sddc-public-ip,set-sddc-public-ip,show-sddc-public-ip,mtu,asn,dx-admin-cost,show-egress-interface-counters,show-routes}
7+
system sub-command help
8+
show-dns-services Show currently configured DNS services
9+
show-dns-zones Show currently configured DNS zone services.
10+
new-sddc-public-ip request a new public IP
11+
remove-sddc-public-ip
12+
remove an existing public IP
13+
set-sddc-public-ip update the description of an existing public IP
14+
show-sddc-public-ip
15+
show the public IPs
16+
mtu Show and update configuration data associated with
17+
Maximum Transmission Unit value for the Intranet
18+
Interface.
19+
asn Show and update configuration data associated with
20+
Autonomous System Number value for the Intranet
21+
Interface.
22+
dx-admin-cost Use to view currently configured routing preference /
23+
admin cost - VPN or DX.
24+
show-egress-interface-counters
25+
show current Internet interface egress counters
26+
show-routes Show SDDC routes
27+
28+
optional arguments:
29+
-h, --help show this help message and exit

Diff for: docs/14-search-nsx_help.txt

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
usage: search-nsx [-h] [--nsxm [NSXM]]
2+
[-ot {BgpNeighborConfig,BgpRoutingConfig,Group,IdsSignature,PrefixList,RouteBasedIPSecVPNSession,Segment,Service,StaticRoute,Tier0,Tier1,VirtualMachine,VirtualNetworkInterface}]
3+
[-oid OBJECT_ID]
4+
5+
optional arguments:
6+
-h, --help show this help message and exit
7+
--nsxm [NSXM] Used to specify NSX Manager instead of
8+
NSX proxy (Default).
9+
-ot {BgpNeighborConfig,BgpRoutingConfig,Group,IdsSignature,PrefixList,RouteBasedIPSecVPNSession,Segment,Service,StaticRoute,Tier0,Tier1,VirtualMachine,VirtualNetworkInterface}, --object_type {BgpNeighborConfig,BgpRoutingConfig,Group,IdsSignature,PrefixList,RouteBasedIPSecVPNSession,Segment,Service,StaticRoute,Tier0,Tier1,VirtualMachine,VirtualNetworkInterface}
10+
The type of object to search for.
11+
-oid OBJECT_ID, --object_id OBJECT_ID
12+
The name of the object you are
13+
searching for.

Diff for: docs/15-vcdr_help.txt

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
usage: vcdr [-h] {scfs,pg,snaps,rsddc,psite,vms} ...
2+
3+
positional arguments:
4+
{scfs,pg,snaps,rsddc,psite,vms}
5+
vcdr sub-command help
6+
scfs VCDR cloud file system - use '-h' for help.
7+
pg VCDR Protection Groups - use '-h' for help.
8+
snaps VCDR Snapshots - use '-h' for help.
9+
rsddc VCDR Recovery SDDC - use '-h' for help.
10+
psite VCDR Protected Site - use '-h' for help.
11+
vms VCDR cloud file system - use '-h' for help.
12+
13+
optional arguments:
14+
-h, --help show this help message and exit

Diff for: docs/16-flexcompute_help.txt

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
usage: flexcomp [-h]
2+
{activity-status,show-all-namespaces,validate-network,create-flexcompute,delete-flexcomp,show-flex-comp-regions,show-flex-comp-templates,show-all-vms,show-all-images,create-vm,power-operation,delete-vm}
3+
...
4+
5+
positional arguments:
6+
{activity-status,show-all-namespaces,validate-network,create-flexcompute,delete-flexcomp,show-flex-comp-regions,show-flex-comp-templates,show-all-vms,show-all-images,create-vm,power-operation,delete-vm}
7+
flexcomp sub-command help
8+
activity-status Get activity status of long running tasks
9+
show-all-namespaces Show all present Cloud Flex Compute Name Spaces
10+
validate-network Validate network CIDR before creating Cloud Flex Compute Name Space
11+
create-flexcompute Create new Cloud Flex Compute
12+
delete-flexcomp Delete existing Cloud Flex Compute
13+
show-flex-comp-regions Show available Cloud Flex Compute regions
14+
show-flex-comp-templates Show available Cloud Flex Compute resource templates to create Name Space
15+
show-all-vms Show all VMs in Cloud Flex Compute instance
16+
show-all-images Show all images available to create VMs from
17+
create-vm Create VM
18+
power-operation Perform Power Operations on VM
19+
delete-vm Delete VM. Make sure VM is in powerd OFF state.
20+
21+
options:
22+
-h, --help

Diff for: docs/2-sddc_help.txt

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
usage: sddc [-h]
2+
{show-compatible-subnets,show-connected-accounts,set-sddc-connected-services,show-sddc-connected-vpc,show-shadow-account,show-sddc-state,show-sddc-hosts,show-sddcs,show-vms}
3+
...
4+
5+
positional arguments:
6+
{show-compatible-subnets,show-connected-accounts,set-sddc-connected-services,show-sddc-connected-vpc,show-shadow-account,show-sddc-state,show-sddc-hosts,show-sddcs,show-vms}
7+
sddc sub-command help
8+
show-compatible-subnets show compatible native AWS subnets
9+
connected to the SDDC
10+
show-connected-accounts show native AWS accounts connected to
11+
the SDDC
12+
set-sddc-connected-services change whether to use S3 over the
13+
Internet(false) or via the ENI(true)
14+
show-sddc-connected-vpc show the VPC connected to the SDDC
15+
show-shadow-account show the Shadow AWS Account VMC is
16+
deployed in
17+
show-sddc-state get a view of your selected SDDC
18+
show-sddc-hosts display a list of the hosts in your
19+
SDDC
20+
show-sddcs display a list of your SDDCs
21+
show-vms get a list of your VMs
22+
create create an SDDC
23+
delete delete an sddc
24+
watch-task watch a task for a long running sddc create or delete
25+
cancel-task cancel a long running task
26+
27+
optional arguments:
28+
-h, --help show this help message and exit

Diff for: docs/3-tkg_help.txt

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
usage: tkg [-h] {enable-tkg,disable-tkg} ...
2+
3+
positional arguments:
4+
{enable-tkg,disable-tkg} sddc sub-command help
5+
enable-tkg Enable Tanzu Kubernetes Grid on an SDDC
6+
disable-tkg Disable Tanzu Kubernetes Grid on an SDDC
7+
8+
optional arguments:
9+
-h, --help show this help message and exit

Diff for: docs/4-segment_help.txt

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
usage: segment [-h] {create,delete,show,update} ...
2+
3+
positional arguments:
4+
{create,delete,show,update}
5+
segment sub-command help
6+
create Create a new virtual machine network segment.
7+
delete Delete a virtual machine network segment.
8+
show Show the current virtual machine network segments.
9+
update Update the configuration of a virtual machine network
10+
segment.
11+
12+
optional arguments:
13+
-h, --help show this help message and exit

Diff for: docs/5-vpn_help.txt

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
usage: vpn [-h]
2+
{new-ike-profile,new-ipsec-profile,new-dpd-profile,new-t1-vpn-service,new-local-endpoint,new-t1-ipsec-session,new-t1-l2vpn-session,new-sddc-ipsec-vpn,new-sddc-l2vpn,remove-sddc-ipsec-vpn,remove-sddc-l2VPN,remove-tier1-ipsec-vpn,remove-tier1-l2vpn,remove-t1-vpn-local-endpoint,remove-t1-vpn-service,remove-vpn-profile,show-sddc-vpn,show-vpn-endpoints,show-sddc-l2vpn,show-vpn-ike-profiles,show-vpn-ipsec-profiles,show-vpn-dpd-profiles,show-tier1-vpn-services,show-tier1-vpn-local-endpoints,show-tier1-vpn,show-tier1-vpn-details,show-tier1-l2vpn,show-tier1-l2vpn-details,rbvpn-prefix-list,rbvpn-neighbors}
3+
...
4+
5+
positional arguments:
6+
{new-ike-profile,new-ipsec-profile,new-dpd-profile,new-t1-vpn-service,new-local-endpoint,new-t1-ipsec-session,new-t1-l2vpn-session,new-sddc-ipsec-vpn,new-sddc-l2vpn,remove-sddc-ipsec-vpn,remove-sddc-l2VPN,remove-tier1-ipsec-vpn,remove-tier1-l2vpn,remove-t1-vpn-local-endpoint,remove-t1-vpn-service,remove-vpn-profile,show-sddc-vpn,show-vpn-endpoints,show-sddc-l2vpn,show-vpn-ike-profiles,show-vpn-ipsec-profiles,show-vpn-dpd-profiles,show-tier1-vpn-services,show-tier1-vpn-local-endpoints,show-tier1-vpn,show-tier1-vpn-details,show-tier1-l2vpn,show-tier1-l2vpn-details,rbvpn-prefix-list,rbvpn-neighbors}
7+
vpn sub-command help
8+
new-ike-profile Create a new VPN IKE Profile
9+
new-ipsec-profile Create a new VPN IPSEC Tunnel Profile
10+
new-dpd-profile Create a new IPSEC DPD profile
11+
new-t1-vpn-service Create a new Tier-1 gateway VPN service
12+
new-local-endpoint Create a new Tier-1 VPN local endpoint
13+
new-t1-ipsec-session
14+
Create a new Tier-1 gateway VPN session
15+
new-t1-l2vpn-session
16+
Create a new Tier-1 gateay L2VPN session
17+
new-sddc-ipsec-vpn Create a new IPSEC VPN tunnel for the SDDC
18+
new-sddc-l2vpn create a new L2VPN for the SDDC
19+
remove-sddc-ipsec-vpn
20+
remove a SDDC IPSec VPN
21+
remove-sddc-l2VPN remove a SDDC L2VPN
22+
remove-tier1-ipsec-vpn
23+
remove a Tier-1 IPSec VPN
24+
remove-tier1-l2vpn remove a Tier-1 L2VPN
25+
remove-t1-vpn-local-endpoint
26+
remove a Tier-1 Local Endpoint
27+
remove-t1-vpn-service
28+
Remove a Tier-1 VPN Service
29+
remove-vpn-profile remove a VPN IKE profile
30+
show-sddc-vpn show the SDDC VPNs
31+
show-vpn-endpoints Show the SDDC VPN endpoints
32+
show-sddc-l2vpn show the SDDC L2VPN
33+
show-vpn-ike-profiles
34+
show the VPN IKE profiles
35+
show-vpn-ipsec-profiles
36+
Show the VPN IPSec Tunnel Profiles
37+
show-vpn-dpd-profiles
38+
Show the VPN DPD Profiles
39+
show-tier1-vpn-services
40+
Show Tier-1 VPN Services
41+
show-tier1-vpn-local-endpoints
42+
Show Tier-1 Local Endpoints
43+
show-tier1-vpn Show Tier-1 IPSec VPN sessions
44+
show-tier1-vpn-details
45+
Show IPSec VPN details for a provided Tier1 VPN name
46+
show-tier1-l2vpn Show Tier-1 L2VPN sessions
47+
show-tier1-l2vpn-details
48+
Show Tier-1 L2VPN Session Details
49+
rbvpn-prefix-list Create and configure route-based VPN prefix lists.
50+
rbvpn-neighbors Show and configure BGP Neighbors for route-based VPN.
51+
52+
options:
53+
-h, --help show this help message and exit

Diff for: docs/6-nat_help.txt

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
usage: nat [-h] {new-nat-rule,remove-nat-rule,show-nat} ...
2+
3+
positional arguments:
4+
{new-nat-rule,remove-nat-rule,show-nat}
5+
nat sub-command help
6+
new-nat-rule To create a new NAT rule
7+
remove-nat-rule remove a NAT rule
8+
show-nat show the configured NAT rules
9+
10+
optional arguments:
11+
-h, --help show this help message and exit

Diff for: docs/7-t1_help.txt

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
usage: t1 [-h] {create,delete,update} ...
2+
3+
positional arguments:
4+
{create,delete,update}
5+
t1 sub-command help
6+
create Create a new, secondary T1 gateway.
7+
delete Delete a secondary T1 gateway.
8+
update Update the configuration of a secondary T1 gateway.
9+
10+
optional arguments:
11+
-h, --help show this help message and exit

0 commit comments

Comments
 (0)