Skip to content
This repository has been archived by the owner on Mar 31, 2022. It is now read-only.

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
shethdhvani committed Nov 5, 2019
0 parents commit 0739b3e
Show file tree
Hide file tree
Showing 38 changed files with 5,954 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Compiled class file
*.class
*.balx
# Log file
*.log

#conf file
ballerina.conf

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

# Ignore everything in this directory
.classpath
.settings
.project
*.iml
*.iws
*.ipr
.idea
.m2
.vscode/
# Ignore ballerina files
accessToken.bal
temp.bal.ballerina/
.DS_Store
target/caches
target/tmp
4 changes: 4 additions & 0 deletions Ballerina.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
org_name = "oracle"
version = "0.1.0"
lockfile_version = "1.0.0"
ballerina_version = "1.0.1"
7 changes: 7 additions & 0 deletions Ballerina.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[project]
org-name = "oracle"
version = "0.1.0"
license= ["Apache-2.0"]
authors = ["oracle"]
keywords = ["oci", "core", "iam", "objectstorage", "oracle"]
repository = "https://github.com/oracle/ballerina-oci"
119 changes: 119 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# CHANGELOG

*Copyright © 2019 Oracle and/or its affiliates. All rights reserved.*

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)

## 1.0.0 - 2019-09-18 Initial Release

### Unreleased
Support for Ballerina 1.0

### Added

Module Core
- Support for Core services

Instance
- GetInstance
- InstanceAction
- LaunchInstance
- ListInstances
- TerminateInstance
- UpdateInstance

VCN
- CreateVcn
- DeleteVcn
- GetVcn
- ListVcns
- UpdateVcn

RouteTable
- CreateRouteTable
- DeleteRouteTable
- GetRouteTable
- ListRouteTables
- UpdateRouteTable

ServiceGateway
- ListServices
- CreateServiceGateway
- DeleteServiceGateway
- GetServiceGateway
- ListServiceGateway
- UpdateServiceGateway
- ChangeServiceGatewayCompartment
- AttachServiceId
- DetachServiceId

InternetGateway
- CreateInternetGateway
- DeleteInternetGateway
- GetInternetGateway
- ListInternetGateway
- UpdateInternetGateway

NatGateway
- CreateNatGateway
- DeleteNatGateway
- GetNatGateway
- ListNatGateway
- UpdateNatGateway

SecurityList
- CreateSecurityList
- DeleteSecurityList
- GetSecurityList
- ListSecurityList
- UpdateSecurityList

Subnet
- CreateSubnet
- DeleteSubnet
- GetSubnet
- ListSubnet
- UpdateSubnet


Module IAM
- Support for Identity and Access Management services

User
- CreateUser
- DeleteUser
- GetUser
- ListUser
- UpdateUser

Group
- CreateGroup
- DeleteGroup
- GetGroup
- ListGroup
- UpdateGroup

Compartment
- CreateCompartment
- DeleteCompartment
- GetCompartment
- ListCompartment
- UpdateCompartment


Module Object Storage
- Support for Object Storage services

Bucket
- CreateBucket
- DeleteBucket
- GetBucket
- ListBucket

Object
- CreateObject
- DeleteObject
- GetObject
- ListObject
80 changes: 80 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Contributing to the Ballerina OCI Connector

*Copyright © 2019 Oracle and/or its affiliates. All rights reserved.*

Pull requests can be made under
[The Oracle Contributor Agreement](https://www.oracle.com/technetwork/community/oca-486395.html)
(OCA).

For pull requests to be accepted, the bottom of your commit message must have the following line using your name and
e-mail address as it appears in the OCA Signatories list.

```
Signed-off-by: Your Name <you@example.org>
```

This can be automatically added to pull requests by committing with:

```
git commit --signoff
````
Only pull requests from committers that can be verified as having
signed the OCA can be accepted.
The requirements are to be test driven. Follow the Gherkin format to define a test flow before writing any production code. This will improve readability and set expectations of what code will do.
# Endpoints
Given: OCID and settings variable(s)
When: API call method
Then: Code response and returned variable.
# Tests
Use same format and include an assert statement.
Given: Test variable(s) defined in method or globally
When: Endpoint method being test
Then: Returned variable or response
Assert: Compare resulting variable with test variable or response with test response
Use test config identifier: <API_MODULE>-<API_CALL>
Example:
@test:Config{
groups: ["instances-list"]
}
# Contributing
1] ballerina.conf - user will specify which OCI resource will be used for HOST
2] constants.bal - create a final string that references OCI resource's from API website
3] test.bal - follow test format above to test all base HTTP REST calls
4] types.bal - create record type. Can grab values from OCI API Resource Reference page from API Website
5] utils.bal - write a createOci<RESOURCE> method for non-null Oci object
6] datamappings.bal - follow method formats to create empty oci resource object, use convert() function from json to Oci resource object
7] endpoint.bal - create oci client method and utilize utils HTTP API call methods for ociGet/Put/Post/DELETE requests
8] Add copyright to top of every file. Example below. Add year as comma separated values.
```
//
// Copyright © 2019 Oracle and/or its affiliates. All rights reserved.
//
// This file is under the Apache License,
// Version 2.0 (the "License"); you may not use this file except
// in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
//
```
Loading

0 comments on commit 0739b3e

Please sign in to comment.