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

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
config.ini
2+
__pycache__
3+
.DS_Store
4+

Dockerfile

Lines changed: 1 addition & 1 deletion
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

README.md

Lines changed: 178 additions & 198 deletions
Large diffs are not rendered by default.

README.pdf

621 KB
Binary file not shown.

config.ini.example

Lines changed: 5 additions & 13 deletions
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

docs/1-csp_help.txt

Lines changed: 27 additions & 0 deletions
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

docs/10-dfw_help.txt

Lines changed: 17 additions & 0 deletions
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

docs/11-nsxaf_help.txt

Lines changed: 34 additions & 0 deletions
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

docs/12-inventory_help.txt

Lines changed: 18 additions & 0 deletions
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

docs/13-system_help.txt

Lines changed: 29 additions & 0 deletions
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

0 commit comments

Comments
 (0)